webbingbrasil / filament-copyactions

A easy-to-use copy actions for Filament Admin Pages, Tables and Form Fields.
56 stars 15 forks source link

Customize notification on actions #6

Closed bernhardh closed 1 year ago

bernhardh commented 1 year ago

Similar to the Column, just give the option to customize the message after clicking on the copy button on forms. Somehing like:

\Webbingbrasil\FilamentCopyActions\Forms\Actions\CopyAction::make()
                    ->copyable(fn($component) => "xxx")
                    ->successMessage(fn($component) => "my message"))
dmandrade commented 1 year ago

You can customize using core action methods: successNotificationMessage/failureNotificationMessage. (Or in the most recent filament version: successNotificationTitle/failureNotificationTitle)

In the last version (v1.1.0) the success message is displayed on a tooltip and don't use filament notifications anymore.