Custom row classes
Hi everyone, i'm trying to use this code : recordClasses(fn (Model $record) => match ($record->is_confidential) {
true => 'bg-red-500',
default => null,
})
but that is not working and without errors.
thank you
Solution:Jump to solution
If you are using the panel builder: https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme
if you are using the table builder only: https://filamentphp.com/docs/3.x/tables/installation#installing-tailwind-css...
6 Replies
You need to provide the errors.
Also read #❓┊help on how to format questions.
thank you, sorry for my short question. I'm trying to give a style to the table rows that have "is_confidential" true attribute, i used the recordClass provided by the doc. I wish my question is more clear
These classes are not automatically compiled by Tailwind CSS. If you want to apply Tailwind CSS classes that are not already used in Blade files, you should update your content configuration in tailwind.config.js to also scan for classes inside your directory: './app/Filament/*/.php'
Thank you for your answer, so I should enter "npx tailwindcss init -p" cmd?
Solution
If you are using the panel builder: https://filamentphp.com/docs/3.x/panels/themes#creating-a-custom-theme
if you are using the table builder only: https://filamentphp.com/docs/3.x/tables/installation#installing-tailwind-css
ok, thank you for your help, I appteciated 👍