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')),
]);
1 Reply
Want results from more Discord servers?
Add your server