Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mohamadTR's avatar

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.

0 likes
0 replies

Please or to participate in this conversation.