Text on columnToggle buttons w/only one column in the toggle set buggy with ColReorder

Text on columnToggle buttons w/only one column in the toggle set buggy with ColReorder

bugreports999bugreports999 Posts: 3Questions: 0Answers: 0

Link to test case:
https://jsfiddle.net/06kgpc1t/

Debugger code (debug.datatables.net):
N/A

Error messages shown:
N/A

Description of problem:
When using columnToggle buttons and reordering columns, the text attribute on columnToggle buttons are NOT honored when the button controls only a single column. In the above JS fiddle, just move a single column and notice how the button text changes (unexpectedly).

More details:

In the test case we have two columnToggle buttons.
"Toggle name column visibility" controls only one column - the name column.
"Toggle position + office columns visibility" controls two columns - the name and office columns.

When you reorder just a single column, notice how the text on the "Toggle name column visibility" column gets changed to "Name", i.e. the actual name of the column it controls. This does not happen for columnToggle buttons that control strictly more than one column. The expected behaviour is that the text on these buttons never changes.

Replies

  • colincolin Posts: 14,612Questions: 1Answers: 2,494

    Yep, thanks for that test case, it's definitely showing an oddity. I've raised it internally (DD-2477 for my reference) and we'll report back here when there's an update.

    Cheers,

    Colin

Sign In or Register to comment.