FilamentF
Filament3y ago
dyo

Limit text in viewColumn

How can I use or implement attribute like in textColumn in custom column?

->limit(25)
->tooltip(function (TextColumn $column): ?string {
  $state = $column->getState();
  
  if (strlen($state) <= $column->getLimit()) {
      return null;
  }
  
  // Only render the tooltip if the column contents exceeds the length limit.
  return $state;
  })
Was this page helpful?