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
3 Replies
Just combine both into one function
Can you tell me what it would be like?
It's just a method that returns a string of classes and you conditionally add to it