row-reordered event issue

row-reordered event issue

ymolinetymolinet 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 ?


This question has an accepted answers - jump to answer


  • kthorngrenkthorngren Posts: 10,586Questions: 25Answers: 2,409
    Answer ✓

    Interesting issue. I tried it here:

    In order to get the rows in the reordered order I added draw() to the row-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 the row-reordered event.


  • ymolinetymolinet Posts: 2Questions: 1Answers: 0

    @kthorngren you are the best :smiley:
    it's perfectly working by adding this workaround.

  • colincolin Posts: 9,791Questions: 0Answers: 1,620

    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...



This discussion has been closed.