ColumnVisibility with ColReorder styling issue

ColumnVisibility with ColReorder styling issue

vyruzvyruz Posts: 5Questions: 2Answers: 0

Hi,

I'm in the progress of upgrading from DataTables 1.10.5 to 1.10.9, mainly because the old flash export tools (TableTools) are no longer working in current browsers.

It's nice to see that all extensions can now be downloaded together with DataTables in one nice clean package, great job!
I do however have a problem when combining the ColReorder plugin with the Buttons/ColumnVisibility extensions.
When loading the page initially, the column visibility drop down works fine, you can see the columns which are active with a blue background, and the columns which are not with a white background. When you click the column names the drop down options are updated accordingly and the columns appear/disappear fine.

However once you drag a column to change the order, the column visibility drop down options seem to get their styling messed up, they become all white-brackground and don't toggle when clicked anymore. also their height seems to change. The columns are however still disappearing/appearing correctly.

Stranger still, it is not fixed when reloading the page, the only way I found to fix it, is to comment out the colReorder : true line of DataTables config temporarily, refresh the page, then uncomment it again. When you reorder any column the problem appears again.

I've been comparing the styles/classes of a 'correct' (dropdown still working fine) page, with the ones of a broken one, and I cannot spot any differences...

I have managed to reproduce this problem in a JSFiddle using the datatables examples from the website, and my configuration parameters:
https://jsfiddle.net/zyq550Ls/

You can see the problem happening when you reorder a column, then click the 'Column Visibility' button.

I feel this is a bug so I decided to post i here. Please ask if any more information is required.

Answers

  • vyruzvyruz Posts: 5Questions: 2Answers: 0

    Bump
    Any ideas on this? As it occurs with a clean datatables example in the jsfiddle I'm convinced this is a bug, should I just create an issue on the github page?

  • vyruzvyruz Posts: 5Questions: 2Answers: 0

    Issue opened for this on GitHub in case anyone's interested:
    https://github.com/DataTables/DataTables/issues/671

  • allanallan Posts: 62,225Questions: 1Answers: 10,208 Site admin

    Quick update on this - it has been fixed in git and will be included in the 1.1.0 Buttons release.

    Allan

This discussion has been closed.