Conditionally rendering an icon in TextColumn
I have a situation where the value of a cell could be "true" or anything else. How can I render an icon instead of text in a TextColumn, I tried this but it didn't work:
Thanks!
Thanks!
Solution
ahh ok. Use
TextColumn::make('value')->icon(fn($record) => $record->value === 'true' ? 'heroicon-o-check' : null)