F
Filamentβ€’10mo ago
onursahindur

Is it possible to add a default emptyStateHeading for all the tables?

Hello I know how to edit emptyStateHeading explained here https://filamentphp.com/docs/3.x/tables/empty-state But I want to ask if it is possible to give a default title for every table I use in system? I want to show for example "No content" for all the tables I use.
3 Replies
onursahindur
onursahindurOPβ€’10mo ago
Let's answer my own question. You can add a view at path resources/views/vendor/filament-tables/components/empty-state/heading.blade.php and use it like <h4 {{ $attributes->class(['fi-ta-empty-state-heading text-base font-semibold leading-6 text-gray-950 dark:text-white']) }}> No Data </h4>
BlackShadow
BlackShadowβ€’10mo ago
Add the following to your AppServiceProvider.php boot method:
Filament\Tables\Table::configureUsing(fn($table) => $table->emptyStateHeading('No data'));
Filament\Tables\Table::configureUsing(fn($table) => $table->emptyStateHeading('No data'));
onursahindur
onursahindurOPβ€’10mo ago
Thank you πŸ™
Want results from more Discord servers?
Add your server