Call action after page load to table mount action
So im getting an URL query parameter. but what i want is after page load it should call to table mount action which is not happening rn.
Let me know if u need anything.
13 Replies
Are you using a page action? Share some code please
Url with query parameter: http://...../admin/proof-requesteds?proof=3
But in this case the action is getting called early before table livewire component is loaded and thus causing error. I need to call $this->js('$wire.mountTableAction("Proof",'.$this->proof.")");
after page load,where is proof action?
proof is not an action but a query parameter
mountTableAction of the table component is the only action I need to call
Where is the action that you need to call?
its in resouces pages directory, its a simple resource.
so basically whenever user redirects to my resource page with that particular query parameter in the url, I want to open the modal( just like we do when we click on any table record, a modal opens) but this time without clicking but through query parameter,
You can pass the action name in the url:
?action=your_action
Like this: https://demo.filamentphp.com/blog/categories?action=importmy action has parameters to it eg: mountTableAction('Proof',3) where 'Proof' is action name & 3 is table id
you suggested answer for an custom/normal action. If you can suggest for table action, which has parameters to them
Eg: https://demo.filamentphp.com/blog/categories in same page we have table with view action that shows details of particular row.
its call to server is: mountTableAction('View',1)
where View is the action name & 1 is the record
any idea ?
A workaround, actually
Hey @Leandro Ferreira, is there a anything in the documentation about the URL parameter "action" that you are using in the categories example? Or is it a custom implemantation?
there isn't in the docs..
Ah too bad. Because it does not work, when I try it. Would to check the specifics bout this feature.
open a new topic, explain the issue and share your code please