issue with column reordering in RTL using ColReorder

issue with column reordering in RTL using ColReorder

mahdi7mahdi7 Posts: 2Questions: 0Answers: 0

Hi there,
I'm encountering an issue with column reordering when using ColReorder in an RTL layout. The columns are not being reordered correctly. For a better understanding of the issue, please refer to the attached demo.
https://live.datatables.net/pivaduhe/1/edit

Thank you for your time and attention to this matter.

Replies

  • mahdi7mahdi7 Posts: 2Questions: 0Answers: 0

    I haven't received any response yet, can anyone help me?

  • entroprentropr Posts: 1Questions: 0Answers: 0

    facing same issue, any luck?

  • allanallan Posts: 65,210Questions: 1Answers: 10,804 Site admin

    This PR should have fixed the issue. Are you able to use the ColReorder nightly and say if it addresses the problem for you. If it does, I'll get it released.

    Allan

  • jasbanajasbana Posts: 2Questions: 1Answers: 0

    Hi Allen
    I have same issue
    and I noticed this line
    in above PR

    private _isRtl() {
    return $(this.dt.table()).css('direction') === 'rtl';
    }

    this part $(this.dt.table()) is return no object
    after i change it to $(this.dt.table().node()) it return object and worked
    can you check it please?

    also instead of search of rtl in the table i think to lookup in body tag can be added also or html tag

  • allanallan Posts: 65,210Questions: 1Answers: 10,804 Site admin

    Hi,

    Completely agree - many thanks for flagging that up. I've committed the suggested change.

    If the body is rtl, then I think the table should be detected as such? It seems to be that way for me in Firefox.

    Regards,
    Allan

Sign In or Register to comment.