A recently found undocumented Filament feature of $defaultAction. Original tweet: x.com/archilex... More Filament examples on our website: filamentexampl...
Since you control the function that executes the message, you could persist a variable that stores if it was displayed, so it wont display it the next time the page is lodaded. Keep in mind there will be an aditional query every page load. Cache could be a good use for this sort of check.
If you find it let me know because I haven't found the correct way to do that. As far as I know, both the open and close events seems to be scoped to the modal document, it's not an event dispatched through Livewire.
Hey Povilas!
To open the action via the URL, the param is called `action` not `defaultAction`, so in your case it would be: ?action=newOrdersToday
This is a nice function to use for showing if there are any overdue invoices. Keep up the great work!
thank you for the video, i didn't know that!
combined with spatie flags, huge!
Yes! I'll use it, great!
Thanks
As always the right video at the right time. Thank you Povilas
Just what I needed, Thankyou Povilas
Maybe you have to add "Action" to the function name ?
It turns out, that you indeed need the property `public $defaultAction = 'newOrdersToday';`. Without that, the action is not fired. 🤔
Good! Is there a way to add an option to "Don't show anymore" in consequent visits to the page?
Since you control the function that executes the message, you could persist a variable that stores if it was displayed, so it wont display it the next time the page is lodaded. Keep in mind there will be an aditional query every page load. Cache could be a good use for this sort of check.
is it possible to do it in the dashboard?
i want auto open model for validation form
What do you mean?
Can someone help me? I need to catch closing modal event, i cant find it in docs
Source dive
If you find it let me know because I haven't found the correct way to do that. As far as I know, both the open and close events seems to be scoped to the modal document, it's not an event dispatched through Livewire.