Make NovaSortable compatible with ExpandableTableRow #186
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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