Modal action unexpectedly reset some livewire props value on custom page
I have custom page created here, I modified the layout so the actions button appears on the right place I want, above those buttons is an $items from livewire prop with the sum. But everytime I click the modal action button, it resets the prop's value.
I was thinking to re-populate the prop values, using modalCancelAction here is what I got, the modalCancelAction is expect to have
Filament\Support\Actions\Modal\Actions\Action
in return5 Replies
Here is the code snippets
modalCancelAction()
isnt doing what you think it is
you cant use it to run logic
its causing the errorThanks for quick response Dan!
I was also tried using
->after(fn ($livewire) => $livewire->loadItems())
. It loads the items for a second but then it got reset againwhat is loadItems and why should it be called when you cancel
It was not specifically on cancel, it also happened on confirm. for example I click the confirm in the video above
Hey Dan! it's solved now. I'm using the livewire listeners to do that. Thanks for your response!
->after(fn ($livewire) => $livewire->emitSelf('shouldLoadItems'))