Action to Button component
Hi experts, I am using filament button component to display in the header. When user clicks on that button, it should open a modal window. How to trigger this action? Can I use actions? If so, how to pass data? Appreciate ideas and pointers on how to do it. By the way, I am not using resources as it is multitenancy model.
7 Replies
You can use Filament Actions, you can pass in data using mountUsing() if memory serves. but what are you trying to do exactly
@toeknee thanks for the reply. I am trying to add a button with pop up to show informational message. I don't understand your statement 'if memory serves'. Does mountUsing take lot of memory? After creating action, how can add the action to the page. Sorry for the newbie questions.
"if memory serves" means "if he remembers correctly" - it has nothing to do with memory usage
from the docs, here is an example
That's a link to the v2 docs but it will still work
So in the example above,
authorId
would get passed to the formIf you are using a custom page, which it sounds like you are, you will need to follow the steps from this link: https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component to render it on a page
@bwurtz999 thanks...really helpful π