© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
44 replies
Shavik

Nullable PHP Enum in Table TextColumn Oddity

I have a model/table that is a collection of various statuses (PHP Enum values) that are nullable if it's never been set.

When using a TextColumn like so:

Tables\Columns\TextColumn::make('state.current_confirmation_status')
  ->label('Confirmation')
  ->placeholder('Unknown')
  ->badge()
  ->sortable(),
Tables\Columns\TextColumn::make('state.current_confirmation_status')
  ->label('Confirmation')
  ->placeholder('Unknown')
  ->badge()
  ->sortable(),


If the field actually has an enum value, it works and shows the badge as expected. If the value in the column is null, then the placeholder (nor
default
default
) doesn't properly set a 'fallback' state.

What am I missing?
image.png
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

Enum trait in TextColumn
FilamentFFilament / ❓┊help
3y ago
PHP Enum "Inheritance " in Filament
FilamentFFilament / ❓┊help
3y ago
How to Enum on TextColumn method?
FilamentFFilament / ❓┊help
3y ago
Table TextColumn URL() Styles
FilamentFFilament / ❓┊help
15mo ago