[Bug]: collapsing seems to be broken on table row because of the breakpoints that doesnt match with the one on table head
mrevanzak opened this issue · 5 comments
What happened?
so this happens to me
the last 2 columns should be on collapse but the table row doesn't disappear, only the table head disappears.
the culprit is lg:table-cell
on the table head but md:table-cell
on the table row
How to reproduce the bug
just use collapseOnTablet() or collapseOnMobile
Package Version
3.2.0
PHP Version
8.1.x
Laravel Version
10
Alpine Version
No response
Theme
Tailwind 3.x
Notes
No response
Error Message
No response
Apologies for the delay, will try to get this one resolved this weekend! It didn't come up during testing oddly, so need to check if I've got something custom on my end.
Okay, identified the issue, will have a fix in this weekend's release!
Hi Joe !
I just installed the package today and might have something that seems connected to that too
Let me know if you need more details
I don't have anything special in the code tho, i've joined the discord so i'll be checking the releases patches from there !
Package Version 3.2
Php : 8.2
Laravel 10
Have a good one !
class LocationCountry extends DataTableComponent
{
protected $model = Country::class;
public function configure(): void
{
$this->setPrimaryKey('id');
$this->setAdditionalSelects(['call_prefix']);
$this->setComponentWrapperAttributes([
'class' => '',
]);
$this->setDebugEnabled();
$this->setSearchEnabled();
$this->setSortingEnabled();
}
public function columns(): array
{
return [
Column::make('Id', 'id')
->sortable(),
Column::make('Name')->label(fn ($row) => $row->name)
->sortable(fn (Builder $query, $direction) => $query->orderBy('name', $direction))
->searchable(fn (Builder $query, $term) => $query->where('name', 'like', '%'.$term.'%')),
Column::make('Iso code', 'iso_code')
->sortable(),
Column::make('Prefix')->label(fn ($row) => '+'.$row->call_prefix)
->sortable(),
Column::make('Zone', 'zone.name')
->eagerLoadRelations()
->sortable(),
BooleanColumn::make('Enabled', 'active')
->sortable(),
];
}
}
My inject core assets was set to false in my config file, setting it to true fixed it !
/**
* Enable or Disable automatic injection of core assets
*/
'inject_core_assets_enabled' => true,
Released in 3.2.1