Closed not-a-doctor-stromberg closed 5 years ago
I think the right move is to use the standard smooth-dnd
library:
@ViewChild('tableBody') tableBody: ElementRef;
onInit() {
SmoothDnD(tableBody, options);
}
Also make sure the wrapperClass is used on the tr
elements so smooth-dnd
knows what can move.
I'm having difficulty configuring this plugin to reordering rows in a regular html table. I tried:
The problem is that this generates html like the following:
You can see we generate an extra
tbody
, which I think is injected by the browser (https://stackoverflow.com/questions/7490364/why-do-browsers-still-inject-tbody-in-html5). Regardless, having the additionaltbody
causes problems with styling and other functionality. Is there anyway to leverage this library with standard html tables like above?