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]
Property [$actionDoSomething] not found on component: [app.filament.resources.stuffhere]
If I try to add InteractsWithActions with my other traits, I get several conflicts:
Trait method 'getMountedActionSchemaModel' will not be applied because it collides with 'InteractsWithRecord'Trait method 'afterActionCalled' will not be applied because it collides with 'InteractsWithRecord'Trait method 'getDefaultActionSuccessRedirectUrl' will not be applied because it collides with 'InteractsWithRecord'Trait method 'getDefaultActionRecordTitle' will not be applied because it collides with 'InteractsWithRecord'Trait method 'getDefaultActionRecord' will not be applied because it collides with 'InteractsWithRecord'
Trait method 'getMountedActionSchemaModel' will not be applied because it collides with 'InteractsWithRecord'Trait method 'afterActionCalled' will not be applied because it collides with 'InteractsWithRecord'Trait method 'getDefaultActionSuccessRedirectUrl' will not be applied because it collides with 'InteractsWithRecord'Trait method 'getDefaultActionRecordTitle' will not be applied because it collides with 'InteractsWithRecord'Trait method 'getDefaultActionRecord' will not be applied because it collides with 'InteractsWithRecord'
I have a filament page defined like so:
use Filament\Actions\Contracts\HasActions;use Filament\Forms\Contracts\HasForms;use Filament\Forms\Concerns\InteractsWithForms;use Filament\Resources\Pages\Concerns\InteractsWithRecord;use Filament\Resources\Pages\Page;class MyPageWithActions extends Page implements HasForms, HasActions{ use InteractsWithRecord, InteractsWithForms; protected static string $resource = MyResource::class; public string|int|null|Model $record; public function actionDoSomething() { return Action::make('actionDoSomething')... }}
use Filament\Actions\Contracts\HasActions;use Filament\Forms\Contracts\HasForms;use Filament\Forms\Concerns\InteractsWithForms;use Filament\Resources\Pages\Concerns\InteractsWithRecord;use Filament\Resources\Pages\Page;class MyPageWithActions extends Page implements HasForms, HasActions{ use InteractsWithRecord, InteractsWithForms; protected static string $resource = MyResource::class; public string|int|null|Model $record; public function actionDoSomething() { return Action::make('actionDoSomething')... }}