Bug with colReorder and datatable.destroy()

Bug with colReorder and datatable.destroy()

aamirahmedaamirahmed Posts: 10Questions: 1Answers: 0

Hi,

I am using colReorder with stateSave": true and "colReorder": true.
When I reorder the column and keep hitting the destroy button, the column header gets reset on alternate destroy while the data retain its state.

Live Example: http://live.datatables.net/kololufo/20/edit

Answers

  • allanallan Posts: 63,531Questions: 1Answers: 10,475 Site admin

    Right enough! Thanks for letting me know about this and the test case. I've created a bug for it (DD-2548 in our internal tracker) and will get this sorted for the next patch release.

    Regards,
    Allan

  • aamirahmedaamirahmed Posts: 10Questions: 1Answers: 0

    Thanks Allan for the reply.
    The column header should also retain its state on destoy.

    Since we are using dataTables in our project and want to use colReorder extension, when can we expect the next patch release?

    Thank You

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    It's not a tight schedule, but as a guide we tend to make releases every month or two,

    Colin

  • aamirahmedaamirahmed Posts: 10Questions: 1Answers: 0
    edited June 2022

    Hi @colin, just wanted to ask is there any way I can track the progress on the bug DD-2548 created by Allan?
    Thank You.

  • allanallan Posts: 63,531Questions: 1Answers: 10,475 Site admin
    edited June 2022

    Just through this thread. Our bug tracker is private.

    I'll try to get to this as soon as I can, but there are a number of paid support cases on the go at the moment which I need to prioritise.

    Allan

  • aamirahmedaamirahmed Posts: 10Questions: 1Answers: 0

    Hi @allan, I can understand prioritizing the paid support cases, just want to know if this bug is being worked upon currently?

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    No, sorry, it's still in the backlog,

    Colin

  • aamirahmedaamirahmed Posts: 10Questions: 1Answers: 0

    Hi @colin, just checking, is the ticket still in backlog? Thank You.

  • allanallan Posts: 63,531Questions: 1Answers: 10,475 Site admin

    Apologies - I lost sight of this issue. I've committed the required fix and it is now in the nightly.

    Your example now works with that change.

    I'm in the middle of doing some build changes for DataTables and its extensions, so I'll be tagging this and releasing it during the week.

    Allan

  • aamirahmedaamirahmed Posts: 10Questions: 1Answers: 0

    Thank You @allan for the update.

  • aamirahmedaamirahmed Posts: 10Questions: 1Answers: 0

    HI @allan, thank you for the update, the original issue has been solved, but now we are seeing this behavior.

    For sorting the date type field, we have used data-order attribute on <td> since date is sorted as string. Now when any column is reordered, only the header is moving.

    If we remove the data-order attribute, the reorder functionality works fine.

    We are using the latest nightly provided in the solution on September 10.

    Live Example: live.datatables.net/kololufo/40/edit

  • allanallan Posts: 63,531Questions: 1Answers: 10,475 Site admin

    I'm afraid that's an on going issue with ColReorder and orthogonal data - apologies.

    As a workaround we can use DataTables 1.12's ability to work with date / time values: http://live.datatables.net/kololufo/41/edit .

    I've added DataTable.datetime('DD/MM/YYYY'); to tell DataTables about the date format you are using and also added Moment.js to the page to support this. Luxon is also an option if you prefer.

    Allan

  • aamirahmedaamirahmed Posts: 10Questions: 1Answers: 0

    Thank you @allan, its working with Moment.js.

  • aamirahmedaamirahmed Posts: 10Questions: 1Answers: 0

    Also @allan, on this ongoing issue with ColReorder and orthogonal data, when can it be expected to be solved?

  • allanallan Posts: 63,531Questions: 1Answers: 10,475 Site admin

    I'm not yet sure - sorry. I've got a bit of a backlog of things I'm working on at the moment and I'm needing to prioritize. I haven't yet been able to make time for the ColReorder issue.

    Allan

  • aamirahmedaamirahmed Posts: 10Questions: 1Answers: 0

    Hi @allan , just wanted to confirm if ColReorder and orthogonal data are compatible now.

    Thank You

  • allanallan Posts: 63,531Questions: 1Answers: 10,475 Site admin

    Apologies - no. I've still haven't been able to prioritise time for ColReorder yet.

    Allan

Sign In or Register to comment.