Changing Visibility Causes Title Issues of Fixed Columns

Changing Visibility Causes Title Issues of Fixed Columns

djkong7djkong7 Posts: 22Questions: 3Answers: 0

I brought up this same issue in https://datatables.net/forums/discussion/57978 but I was able to work around it with your help. I've now changed up my visibility calls for performance for reasons outlined in https://datatables.net/forums/discussion/58304/ which have made the issue unavoidable.
http://live.datatables.net/hisajofe/21/edit in this example changing the visibility with table.column().visible([true/false], false) results in the title not being correct for the fixed columns.

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    edited October 2019 Answer ✓

    Hi @djkong7 ,

    If you tell FixedColumn extension to update with fixedColumns().update() everything works as expected, see here.

    Hope that does the trick,

    Cheers,

    Colin

  • djkong7djkong7 Posts: 22Questions: 3Answers: 0

    Clicking "show by all" in the example like this also leads to an error. In the example console it only says script error, on my page, it's showing "dataTables.fixedColumns.min.js:25 Uncaught TypeError: Cannot read property 'cell' of undefined". That line is

    m[g][i].cell.className = n[g][i].cell.className
    
  • djkong7djkong7 Posts: 22Questions: 3Answers: 0

    We posted at the same time. Looks like that issue is resolved by calling update.

  • djkong7djkong7 Posts: 22Questions: 3Answers: 0

    That fixed my issue though. Thank you!

This discussion has been closed.