Customize / translate CreateAction modal title
I am using the create action (see https://filamentphp.com/docs/3.x/actions/prebuilt-actions/create#overview) as a ->headerAction() in a v3 standalone Table Builder. How can I customize / translate the title of the CreateAction modal (see screenshot). I couldn't find it in the doc or by searching here.
I tried to add the string "comment" to the language file which didn't work. Also it does not use the label attribute of the CreateAction (which would be the easiest way to customize and translate).
6 Replies
->modalHeader(fn () => __('translation-key'))
Thanks. I am getting this error:
Method Filament\Tables\Actions\CreateAction::modalHeader does not exist.
Solution
Aaah its:
->modalHeading(fn () => __('translation-key'))
yep, was just about to respond. sorry.
Thanks @awcodes
np