F
Filament7mo ago
Kymset

Dynamic Customise Columns for Table

I have checked the docs and I don't think it exists. Am I able to add some kind of filter / option so I can select which fields I want to see in a table. For example I have a table with the following columns: Id | Name | Email | Address 1 | Address 2 | Country | Zip | Phone | Mobile | Actions Some times I only care about seeing the Name, email and Actions. Is there some functionality so I can hide the other fields?
Solution:
Sure, chain this method to the table field ->toggleable(isToggledHiddenByDefault: true)
Jump to solution
2 Replies
Solution
Desmond Njuguna
Desmond Njuguna7mo ago
Sure, chain this method to the table field ->toggleable(isToggledHiddenByDefault: true)
Desmond Njuguna
Desmond Njuguna7mo ago
So the final snippet will be Tables\Columns\TextColumn::make('phone') ->searchable() ->toggleable(isToggledHiddenByDefault: true),
Want results from more Discord servers?
Add your server