how datatable should hide a column with visible: false
how datatable should hide a column with visible: false
stwe
Posts: 8Questions: 3Answers: 0
Hi,
I'm the developer of the https://github.com/stwe/DatatablesBundle
There, I have an issue with visible = false.
Can you explain me how datatable should hide a column with visible: false (http://datatables.net/reference/option/columns.visible) ?
It puts a css class on column or somewhere ? or it does just create the dom for this column?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi,
DataTables will create the required cell, but it simply doesn't insert it into the document. I found that using CSS to hide cells was a recipe for performance and cross browser issues which is why DataTables only puts the nodes required into the document. The unused nodes are held in Javascript memory, and can be accessed using the API.
Regards,
Allan
ok thanks for the reply. Is there a known issue with visible = false? In some cases, the columns are still displayed.
No. Can you link to a test case if you are having a problem with it please.
The one common 'gotcha' is using Responsive with column visibility, since Responsive controls the column visibility. You can add the class
never
to a column if you never want it to be visible.Allan