© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
3 replies
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;
  })
->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;
  })
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

html + limit in text column
FilamentFFilament / ❓┊help
3y ago
Custom ViewColumn styles
FilamentFFilament / ❓┊help
3y ago
how to use ->wrap() in ViewColumn
FilamentFFilament / ❓┊help
3y ago
Set the max width of viewColumn and wrap the text
FilamentFFilament / ❓┊help
2y ago