I'm currently migrating my app to Filament V4 and I've encountered an issue when trying to add actions to a custom simple page.
In V3, I could define an action in the page class and render it in the Blade file like this: {{ $this->myAction }}, and it worked as expected. I'm trying to replicate that behavior in V4, but the action doesn't seem to execute properly when clicked.
{{$this->test()}} (Note: I also tried {{ $this->test }} like in V3, but that doesn’t work either.)
{{$this->test()}} (Note: I also tried {{ $this->test }} like in V3, but that doesn’t work either.)
The button renders correctly, and I can see a network request being made when I click it, but nothing happens, no notification is shown, and the action callback doesn’t seem to run.
Has the method for handling actions in custom pages changed in V4?
Any help would be appreciated, thanks in advance!
Solution
I got it to work, apparently, it only functions correctly if you explicitly specify the return type as : Action.