© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
12 replies
maxtor831

How to use TextColumn instead of SelectColumn?

Hi all,

I am new to filament, started looking at it last week.

Can you please help, I basically want to display TextColum instead of SelectColumn based on this?

public static function table(Table $table): Table
{
return $table
->columns([
SelectColumn::make('status')
->options([
'0' => 'Draft',
'1' => 'Complete',
'2' => 'Incomplete',
])


Would you be able to advise please, much appreciated.

thanks
#TextColumn #SelectColumn
Solution
TextColumn::make('status')
  ->formatStateUsing(function(string $state) {
    return match($state) {
      '1' => 'Complete',
      '2' => 'Incomplete',
      default => 'Draft',
    };
  })
TextColumn::make('status')
  ->formatStateUsing(function(string $state) {
    return match($state) {
      '1' => 'Complete',
      '2' => 'Incomplete',
      default => 'Draft',
    };
  })


For enums see https://filamentphp.com/docs/3.x/support/enums
Enums - Core Concepts - Filament
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Table TextColumn of a toggle how to display Enabled / Disabled instead of 1 / 0?
FilamentFFilament / ❓┊help
9mo ago
How to change the content of TextColumn
FilamentFFilament / ❓┊help
3y ago
How to increase SelectColumn width?
FilamentFFilament / ❓┊help
2y ago
How to use array in getTableQuery instead of Builder?
FilamentFFilament / ❓┊help
3y ago