Calling `callMountedFormComponentAction` with arguments does not not pass it into the

To give a bit of context. I have an Action class that opens a Modal. (This Action class is being used in the hintActions of a repeater field) I render a custom livewire component inside the action's modal by doing modalContent(fn ($record) => new HtmlString(Blade::render("@livewire('custom-component')"))) Inside the Livewire custom-component, i'm able to call $wire.$parent.callMountedFormComponentAction({param: [1,2,3]}) And this calls the mountedAction like i expected ->action(function (Set $set, $component, $arguments) However the injected $arguments is always an empty array. I expected the array to contain an element with key param like ['param' => [1,2,3]] Any hint as to what i might be doing wrong.
7 Replies
Mansoor Khan
Mansoor Khan4mo ago
@Passenger It seems to be an issue with newer versions. I was on v3.0.62 and once i updated to 3.2 i started hiting this issue. Not sure if its Livewire or Filament related.
Mansoor Khan
Mansoor Khan4mo ago
GitHub
Calling callMountedFormComponentAction with arguments does not pa...
Package filament/filament Package Version v3.2 Laravel Version v10.0 Livewire Version v3.x PHP Version PHP8.2 Problem description I have upgraded my Filament app from v3.0.62 to v3.2.x and I am fac...
Passenger
Passenger4mo ago
Thanks for helping to create the issue. I have since resolved this in a different way. Its my fault for using an internal undocumented method 🤷
Mansoor Khan
Mansoor Khan4mo ago
Good to know you have resolved.. What was your way of solving it, if you can share please. I also have a similar use case where i need to use/pass a custom Livewire component to Filament Action.
Passenger
Passenger4mo ago
Oh. I meant a I used a native component instead of the custom component I was building. It was less ideal UX for the project, but we were on a crunch. Sorry I couldn't be of more help
Mansoor Khan
Mansoor Khan4mo ago
Ah, alright then. No problems. Thanks. I will write an update here in case you ever need it. This has been fixed now 🚀