How pass a record into formatStateUsing method ? #9787
-
When in a table I need to show formatted value for some column I use formatStateUsing method:
But I did not find how can I pass a record itself, as resulting value is calculated value based on several field :
Method getSummaryPointsPercent - returns string, but is is not rendered, as I see empty cell field...
Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Is the $record null? |
Beta Was this translation helpful? Give feedback.
-
Try like that
` |
Beta Was this translation helpful? Give feedback.
-
We can use |
Beta Was this translation helpful? Give feedback.
TextColumn::make('summary_points_percent')->getStateUsing(fn($record) => $record->user_name)
What is the output?