Nest Modal Needs Two Click To Open
I have a table whith an action on each record to open a modal (slideover) to view the record details.
The modal content is a custom livewire component and is called like this
This opens the slideover with the component just perfect! The component uses
InteractsWithTable
and displays a table just fine π
Now that table again also have a table action on each record to preview an image.
I am using ->infolist([...])
to populate the popup.
This again is working just fine and is awesome! The slideover comes in and the nesten modal opens. Good stuff!
But! I always need to click two times the first time I want to preview a file after opening the slideover.
I open the slideover on a record, then if I click on the preview action I get this error in the console:
If I click it again, it workes! and any next preview action click I do in the same slideover also works on the first click. It is just that first click right after the slideover is opened.
If I close the slideover and open a new slideover, I still have to click two times on the first preview action.
Anyone have any ideas?1 Reply
I noticed that if I open the slideover with the table and filter/sort or do anything in that table that will update the rows - and then click the preview action - it will open directly without a double click π
Not sure what to conclude with that, but maybe just trigger a table update at "mount" might be a quick hacky fix.. ?