© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
ekrbodo

IconColumn enum

I´m trying to use a IconColumn on a field which is casting a Enum. I´m getting this error:

App\Filament\Resources\QualityResource::App\Filament\Resources{closure}(): Argument #1 ($state) must be of type string, App\Enum\QualityType given

Is there another way to get this working?

Code-example

use Filament\Tables\Columns\IconColumn;
 
IconColumn::make('type')
    ->icon(fn (string $state): string => match ($state) {
        'draft' => 'heroicon-o-pencil',
        'reviewing' => 'heroicon-o-clock',
        'published' => 'heroicon-o-check-circle',
    })
use Filament\Tables\Columns\IconColumn;
 
IconColumn::make('type')
    ->icon(fn (string $state): string => match ($state) {
        'draft' => 'heroicon-o-pencil',
        'reviewing' => 'heroicon-o-clock',
        'published' => 'heroicon-o-check-circle',
    })
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

IconColumn not working
FilamentFFilament / ❓┊help
15mo ago
IconColumn no response
FilamentFFilament / ❓┊help
3y ago
IconColumn display error v3
FilamentFFilament / ❓┊help
2y ago
Using `icons` with IconColumn
FilamentFFilament / ❓┊help
3y ago