Open action modal from dropdown item
I'm probably making some silly mistake but I can't figure out how to open action modal from dropdown list blade component https://filamentphp.com/docs/3.x/support/blade-components/dropdown
The example shows
But what exactly is
openDeleteModal
supposed to return?10 Replies
openDeleteModal
is action in the page of whenever you use it. it's a livewire thing
before using filament maybe learn basics of livewire?I understand that it's a Livewire action. I want to understand what to de in the handler for that action to open Filament modal.
Looking at the example of how
block-picker.blade.php
uses it for Builder component, it seems that I have to use mountFormComponentAction
. I'll explore this further.still don't understand what dropdown has to do with a modal? in your shown example when you press on the dropdown you are trying to call livewire method when it should show values in the dropdown
still don't understand what dropdown has to do with a modal? iIn this example, there's an "Delete" item in drowdown. When clicked, I want to open confirmation modal and upon confirm perform the delete operation. To me, that action sound like "Filament action" which is not the same what "action" means in Livewire.
requiresConfirmation()
So I have this
when clicked, Liviwire will trigger
What's the content of that method. Do I need to return Filament action from there?
filament already has delete action why can't you just use that?
I'm using this as example to understand how to trigger Filament action from dropdown item
I'll have dropdown with multiple items. Each item will perform some task. And for some tasks, I need to gather additional input through form. As an example, I have Action
and I want to trigger that from dropdown item
ok, I think I have to use ActionGroup and render that instead of trying to hook actions to hardcoded blade dropdown
cccccckgbbjtbtdlchltckhfiedrnuhuifeenbijckbk