Workaround for deleteOptionAction
In Filament, we have a createOptionAction to add new values to a Select which is related to another model. Also, we have an editOptionAction. But we have not a deleteOptionAction. So I tried to add a delete button inside the editOptionAction using . The button renders fina, but it simply doesn't do anything. Here is my code so far:
Here I'm working with tow models called Uom (Unit Of Measure) and UomCategory. I don't want to create a full Resource only for CRUD of UomCategory if it's not necessary.
Can you give me any advise or tip? Thanks in advance!
2 Replies
I've also tried:
I've struggled with this and I can't get it working. Anyone has any insight about it?
I'm pretty sure this happens because your delete action doesn't get mounted to the livewire page component. You need to register it on your Select form component first.
Something like this should do the trick.