Unable to use InteractsWithActions and InteractsWithRecord at the same time
I'm trying to upgrade my app from v3 -> v4.
The problem I am trying to solve: How can I make it so I can define actions in my blade template and use InteractsWithRecord?
I'm getting this error, which tells me I probably need to add InteractsWithActions:
Property [$actionDoSomething] not found on component: [app.filament.resources.stuffhere]
If I try to add InteractsWithActions with my other traits, I get several conflicts:
I have a filament page defined like so:
And in my blade file I have the following:
3 Replies
Try changing the forms to schemas. https://filamentphp.com/docs/4.x/components/form#adding-the-form
I feel really goofy - it turns out that I was running into issues because I needed to specify the return type on the method for Filament to pick it up. Like
public function actionDoSomething(): Action
.
No need to include InteractsWithActions
if you already have InteractsWithRecords
.Don’t feel goofy. Something’s aren’t always obvious. Even I didn’t catch it.