Setting column visibility is slow for non boolean values

Setting column visibility is slow for non boolean values

AllanCochraneAllanCochrane Posts: 41Questions: 1Answers: 2
edited February 2014 in DataTables 1.10
In the console output for http://jsfiddle.net/ucP7s/36/ you can see that non boolean (yet still truthy) values for the argument to column().visible() slow down the code substantially.

Not a bug per se but maybe a chance for future optimisation?

Replies

  • allanallan Posts: 63,692Questions: 1Answers: 10,500 Site admin
    Yeah - not a bug, as only a boolean value is currently expected there. Indeed, this might well have unexpected consequences on plug-ins such as ColVis since the value passed in is written directly tot he internal data source for the column visibility.

    If option types are allowed in future, I'll update the documentation accordingly, but I'd suggest sicking with just what is documented for now. Everything else is an undefined state.

    Allan
This discussion has been closed.