nova-sortable
nova-sortable copied to clipboard
Make NovaSortable compatible with ExpandableTableRow
Hello,
I've made some changes to NovaSortable to get it compatible with ExpandableTableRow.
The main problem was that you override various components.
Following same method as dcasia / @milewski, I've removed override ResourceTableHeader and ResourceTableRow. As the expandable-table-row inject toggler near checkbox and a new line to display data, nova sortable was broken.
To fix it, I've wrapped row inside a tbody and move draggable component on table tag level. Finally I've add index property as this is required to be swap correctly indexes.
By the way I've added a config file to be able to hide/show moveTo buttons.
Note that currently the events move-to-up and move-to-end are not received by the parent component. I'm searching for a solution for this issue.
I hope that you will consider my PR as both package are very useful and without these changes you can't use together. Moreover if you want to inject thead or tfoot with any other it will possible now. Note that this approach save us from any Nova upgrade too.
I'm looking for a way to remove ResourceTable.vue override too.
Regards