Limit max customer name length and add tooltip
This commit is contained in:
parent
08265eff26
commit
903ab95d6c
@ -347,6 +347,17 @@ public static function table(Table $table): Table
|
||||
->sortable(),
|
||||
|
||||
TextColumn::make('customer.company_name')
|
||||
->limit(25)
|
||||
->tooltip(function (TextColumn $column): ?string {
|
||||
$state = $column->getState();
|
||||
|
||||
if (strlen($state) <= $column->getCharacterLimit()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Only render the tooltip if the column content exceeds the length limit.
|
||||
return $state;
|
||||
})
|
||||
->searchable()
|
||||
->sortable(),
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user