Refresh datatable form a https://github.com/wire-elements/modal #1067
-
When I delete an element from a (https://github.com/wire-elements/modal), the data table is not updating. WHAT AM I WRONG? public function delete() { |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
So your Table Component should preferably have something like the below, sot that you can distinguish which Table Component you're issuing a refresh to: /**
* @var array<mixed>
*/
protected $listeners = ['refreshDayTable' => '$refresh']; Then in your Modal component, $this->emit("refreshDayTable"); If this isn't working, then take a look using DebugBar and see if the emit event is actually firing. Definitely works emiting from that Modal component to the Data Table though, as I use a modified version of WireElements Modal. |
Beta Was this translation helpful? Give feedback.
So your Table Component should preferably have something like the below, sot that you can distinguish which Table Component you're issuing a refresh to:
Then in your Modal component,
If this isn't working, then take a look using DebugBar and see if the emit event is actually firing. Definitely works emiting from that Modal component to the Data Table though, as I use a modified version of WireElements Modal.