laravel-livewire-tables
laravel-livewire-tables copied to clipboard
[Bug]: Sorting breaks table when using LivewireComponentColumn
What happened?
Clicking a field column header with sorting enabled, should apply the requested sort with no errors. Instead the sort is applied but then the datatable breaks. Filtering and columns visibility seems to work fine.
How to reproduce the bug
Build a datatable, use a LivewireComponentColumn as one of the columns. Click on any orderable field. Data is sorted but the table breaks. This is more evident if you enable bulk actions. because some checkboxes disappears like the screenshots below
In browser console there is the following js, livewire related error:
Uncaught Component already initialized
Package Version
3.4.16
PHP Version
8.3.x
Laravel Version
11.21.0
Alpine Version
3.14.1
Theme
Tailwind 3.x
Notes
No response
Error Message
Uncaught Component already initialized