How can i access the entire table record from a custom table column

i need to conditioanlly display a column per record in the table. I need to access a flag on the record to conditionally display data on another column on the filament table. Thanks
6 Replies
josef
josef2y ago
->visible(static fn ($record): bool => $record->flag === 'value'))
->visible(static fn ($record): bool => $record->flag === 'value'))
jlove1672
jlove1672OP2y ago
Hi @josef , thanks for getting back Sorry i might not have been that clear in my original message I need to conditionally display a cell in the table record. ->visible(false) removes the entire column for all records for me I would like some of the cells inside a column to visible and some not Thats why i started going to the route of custom columns
josef
josef2y ago
use the same principle for the column content?
jlove1672
jlove1672OP2y ago
Im not sure how i can tap into the other columns (table record) within a custom column to conditionally hide this cell
josef
josef2y ago
->formatStateUsing(Closure $get): string => if ($get('column_name')=== 'something') { return ''; })
->formatStateUsing(Closure $get): string => if ($get('column_name')=== 'something') { return ''; })
jlove1672
jlove1672OP2y ago
Yeah i was going to say im settling for this - the thing is the column is a select column so setting the value to null/empty would just empty the select input and not hide it completely. I think im allowed to do this for now however - thanks
Want results from more Discord servers?
Add your server