© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•6mo ago•
1 reply
DerekCaswell

Hidden class not working on SelectColumn

Hey, I'm working on an app for managing a book business. The BookResource has an AuthorsRelationManager and in the table I have the following column.
SelectColumn::make('pen_name')
   ->extraAttributes(fn ($record) => empty($record->pen_names) ? ['class' => 'hidden'] : [])
   ->options(fn (Author $record) => $record->penNameOptions()),
SelectColumn::make('pen_name')
   ->extraAttributes(fn ($record) => empty($record->pen_names) ? ['class' => 'hidden'] : [])
   ->options(fn (Author $record) => $record->penNameOptions()),

I'm applying the hidden class with the extraAttributes so that it only hides the dropdown on authors that don't have pen names. After upgrading to v4 however, this stopped working. The hidden class is getting applied to the parent div but it's having no effect. I did come up with a solution by simply applying an inline style as such:
SelectColumn::make('pen_name')
   ->extraAttributes(fn ($record) => empty($record->pen_names) ? ['style' => 'display: none;'] : [])
   ->options(fn (Author $record) => $record->penNameOptions()),
SelectColumn::make('pen_name')
   ->extraAttributes(fn ($record) => empty($record->pen_names) ? ['style' => 'display: none;'] : [])
   ->options(fn (Author $record) => $record->penNameOptions()),

I'm wondering if anyone knows why the hidden class isn't working anymore and if there's anything I can do about it?
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

Why selectColumn is not working
FilamentFFilament / ❓┊help
2y ago
Disabled class not working ON INPUTS
FilamentFFilament / ❓┊help
2y ago
searchable on SelectColumn?
FilamentFFilament / ❓┊help
2y ago
Table Widget hidden() not working
FilamentFFilament / ❓┊help
3y ago