© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
David | Fortune Validator

Table ->groupsOnly() Heading UI Issue

I think I found a bug when using the ->groupsOnly() on a table. Code below and picture to following. The first column ( group identifier ) is not adding a header to the table and everything shunts to the left.

return $table
            ->query(Invoice::query()
                ->when(
                    Invoice::has('client'),
                    function ($query) {
                        $query->whereHas('client', function ($query) {
                            $query->where('origin', 'internet');
                        });
                    }
                )
                ->where('date', '>=', Carbon::now()->subYear()->format('Y-m-d'))
            )
            ->defaultGroup('client.company_name')
            ->groupsOnly()
            ->columns([
                Tables\Columns\TextColumn::make('sub_total')->summarize(Sum::make()->label('Sub Total')),
                Tables\Columns\TextColumn::make('budgetProfit')->summarize(Sum::make()->label('Budget Profit')),
                Tables\Columns\TextColumn::make('profit')->summarize(Sum::make()->label('Profit')),
            ]);
return $table
            ->query(Invoice::query()
                ->when(
                    Invoice::has('client'),
                    function ($query) {
                        $query->whereHas('client', function ($query) {
                            $query->where('origin', 'internet');
                        });
                    }
                )
                ->where('date', '>=', Carbon::now()->subYear()->format('Y-m-d'))
            )
            ->defaultGroup('client.company_name')
            ->groupsOnly()
            ->columns([
                Tables\Columns\TextColumn::make('sub_total')->summarize(Sum::make()->label('Sub Total')),
                Tables\Columns\TextColumn::make('budgetProfit')->summarize(Sum::make()->label('Budget Profit')),
                Tables\Columns\TextColumn::make('profit')->summarize(Sum::make()->label('Profit')),
            ]);
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

Performance of `$table->groupsOnly()`
FilamentFFilament / ❓┊help
3y ago
Table Heading Lable
FilamentFFilament / ❓┊help
3y ago
Table widget heading change
FilamentFFilament / ❓┊help
2y ago
Table merging Heading and Toolbar
FilamentFFilament / ❓┊help
13mo ago