Reopen sorting-dynamic-tables-sorts-the-old-value
Reopen sorting-dynamic-tables-sorts-the-old-value
I need to reopen an old question https://datatables.net/forums/discussion/464/sorting-dynamic-tables-sorts-the-old-value
I use angular and i have inside the TD element not simples values, but sometimes i have inputs element or other dom elements that contains the values i need to sort.
example
<td><input [ngClass]=".." [(ngModel)]="theValue"></td>
How can i update these values without redraw the tables and maintains the dom element inside.
I've tried to use
const rowElement = $(model.event.target).closest('tr');
(<any>$('#table').dataTable()).fnUpdate(model.item, rowElement, 2, false);
It works BUT it removes all the angular code inside the TD element.
Please i need help.
Best regards
Andrea
This question has an accepted answers - jump to answer
Answers
See if the Live DOM Ordering example helps.
Kevin
Thanks Kevin!
Now it works perfectly