Mounting custom Actions in Schemas through Javascript in V4
Follow-up question to https://discord.com/channels/883083792112300104/1417983986948378704/1418278356243447810
The docs have a section about triggering actions from code
https://filamentphp.com/docs/4.x/components/action#programmatically-triggering-actions
Here,
mountAction()
is called with 2 arguments - the action, the and a JSON object which will be exposed to the action through the $arguments
array.
In the response above awscodes uses $wire.callSchemaComponentMethod()
which seems to be from the InteractsWithSchemas
trait.
To be brief, it seems like mountAction() now takes a $context
argument and it doesn't really work if you omit it?
I've been trying to trigger Actions in a Form using wire:keydown
extraAttributes or Alpine @keydown
alpineExtraAttributes on other components and I had no luck until I copy-pasted what I can only assume to be the $context
from the Action trigger into a third argument for mountAction()
and I'm just very confused about how it all works now since the docs are so reductive on this part0 Replies