Mar 5, 2024
0
Level 1
Custom Layout for toggleable columns dropdown
Hello! So basically, I've created a table with grouped columns for each record to display their attributes properly. For example:
ColumnGroup::make('Channels', [
Tables\Columns\TextColumn::make('channels.name')->sortable()->toggleable()
->label('Name')
->searchable(),
Tables\Columns\TextColumn::make('channels.type')->sortable()->toggleable(isToggledHiddenByDefault: true)
->label('Type')
->searchable(),
]),
ColumnGroup::make('Endpoints', [
Tables\Columns\TextColumn::make('endpoints.name')->toggleable()->sortable()
->label('Name')
->searchable(),
BadgeColumn::make('endpoints.type')->toggleable()->sortable()
->label('Type')->colors([
'warning',
])
->searchable(),
Tables\Columns\TextColumn::make('endpoints.ip_address')->toggleable()->sortable()
->label('IP Address')
->searchable(),
]),
In the toggleable column dropdown, it shows duplicate "Name" and "Type" for both channel and endpoint columns. how I customize it by group or make it clearer for the user, and I dont want to edit lables.
Please or to participate in this conversation.