Refresh Custom Modal Form
I have a modal that displays a custom form
This form displays the selections for that order. I have custom Action that allows a user to delete a selection. My question is - how can I trigger the modal to refresh the form with the updated list of selections (i.e.: remove the one that was just deleted)?
I tried using
extraAttributes
and giving each selection a custom class and then using $this->js()
to try and hide the entire row but that didn't work. I'd settle for triggering the modal to close and then re-open.Solution:Jump to solution
I was able to figure it out. I handled deleting the
selection
in the form action as usual then I used after
dispatching an event
```
Actions::make([
Action::make('deleteSelection' . $existingSelection->id)...3 Replies
What is a 'selection' in this context? Can you share more info on what the form looks like?
Solution
I was able to figure it out. I handled deleting the
selection
in the form action as usual then I used after
dispatching an event
Nice