ImportAction on suffixAction
How can i add ImportAction on TextInput SuffixAction? If i add as i know it throws error:
Filament\Forms\Components\TextInput::suffixAction(): Argument #1 ($action) must be of type Filament\Forms\Components\Actions\Action|Closure, Filament\Actions\ImportAction given
Thanks!
2 Replies
Hello,
suffixAction() method of a TextInput component in the Filament Forms package expects an argument of type Filament\Forms\Components\Actions\Action or a Closure, but you are trying to pass an ImportAction, which is not compatible.
Try to define a custom action
TextInput::make('whatever')
->suffixAction(
Action::make('import')
->label(whatever import')
->action(function () {
//whatever function
})
Greetings
N16htSh1ft
it works, but with this i cannot use prebuilt importaction