table headers disappear when using collapsible table rows.

What am I doing wrong? I added collapsible table rows and now my previously nice sortable columns have no headers?
public static function getTableColumns()
{
return [
Split::make([
TextColumn::make('status')

TextColumn::make('invoice_nbr')->label('Invoice number')->sortable(),
TextColumn::make('transaction_date')->sortable()
->date('n/j/Y'),
TextColumn::make('transactionType.name')
->badge()

)->sortable(),
TextColumn::make('po_nbr')->label('PO number'),
TextColumn::make('original_amount')->formatStateUsing(fn ($state) => '$' . number_format($state / 100, 2))

])->sortable(),
TextColumn::make('balance')->formatStateUsing(fn ($state) => '$' . number_format($state / 100, 2))

])->sortable()
]),
Panel::make([
...collapsible stuff...
])
];
}
public static function getTableColumns()
{
return [
Split::make([
TextColumn::make('status')

TextColumn::make('invoice_nbr')->label('Invoice number')->sortable(),
TextColumn::make('transaction_date')->sortable()
->date('n/j/Y'),
TextColumn::make('transactionType.name')
->badge()

)->sortable(),
TextColumn::make('po_nbr')->label('PO number'),
TextColumn::make('original_amount')->formatStateUsing(fn ($state) => '$' . number_format($state / 100, 2))

])->sortable(),
TextColumn::make('balance')->formatStateUsing(fn ($state) => '$' . number_format($state / 100, 2))

])->sortable()
]),
Panel::make([
...collapsible stuff...
])
];
}
No description
5 Replies
Jon Mason
Jon Mason6mo ago
Based on the screenshots in the docs, this seems to be the intended behavior, but in my case, not having the table headers eliminates valuable context about the table data. I get the use cases in the docs it probably makes sense, but my use case is more basic tabular data that has associated data I want to display when expanded.
spacedev
spacedev6mo ago
Hi Jon, I had the same problem and as workaround, I used description('Text'), position: 'above') It's not the same as having a standard header of course
Jon Mason
Jon Mason6mo ago
Thanks for that, but I don't think it'll work for me in my situation unfortunately.
ChesterS
ChesterS6mo ago
It's the Split::make that removes the column headers. Unfortunately, that's the only way to have responsive tables
cakan
cakan4mo ago
I've noticed that description is displayed only if there is data. Is it possible to force display a description even if cell value is null?
Want results from more Discord servers?
Add your server
More Posts