row-reordered event issue
row-reordered event issue
ymolinet
Posts: 2Questions: 1Answers: 0
Hi all,
I'm try to use row-reordered event to do some calculate on the data.
The event is fired, and call an external js function.
In this function, I call o.DataTable().rows();
The result is the data ordered as before the reorder, not after ...
How can I trigger an event after the reorder ?
Thanks,
Yannick
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Interesting issue. I tried it here:
http://live.datatables.net/jetojape/1/edit
In order to get the rows in the reordered order I added
draw()
to therow-reordered
event. You can probably do the same as a workaround but it does seem like an unexpected behavior.@allan or @colin can let us know if this is expected behavior. I would expect not to need the extra
draw()
to get the data in the new order within therow-reordered
event.Kevin
@kthorngren you are the best
it's perfectly working by adding this workaround.
Hi @kthorngren and @ymolinet ,
Yep, that looks wobbly to me - I'll raise a ticket for is. Apologies for the delay in replying, another one that got lost in the inbox...
Cheers,
Colin