FilamentF
Filament15mo ago
jmrufo

Several recordClasses

Hi guys.

I would like to apply several css styles according to the added rules but I can't find a way to be able to do more than one check with recordClasses.

If I create this rule it works perfectly:

->recordClasses(
fn (Programming $record) => $record->canceled == 1 ? 'my-line-bg-canceled' : null
)

But I would also like to add this other one that checks another property:

->recordClasses(
fn (Programming $record) => $record->incident == 1 ? 'my-line-bg-incident' : null
);

Can someone tell me if this is possible in filament.

Thanks to all
Was this page helpful?