Column Control appears two times
Column Control appears two times
Hello,
I'm not new to DataTables.
But recently in a small project I wanted to use Column Control plugin. Everything works perfectly except that those controls are appear two times per column.
Any hints how to debug ?
Maybe something is called twice ? But could not figure it out yet. It is simple php file (twig Templates) which loads 4 rows from the database.
new DataTable("#test-table",{
paging: true,
searching: false,
columnControl: ['order', 'colVisDropdown',['searchList']],
ordering: {
indicators: false
}
});

Answers
Your code snippet works as expected in this test case:
https://live.datatables.net/jepilupa/1/edit
Can you provide a link to your page or a test case replicating the issue so we can help debug?
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
You have
searching: false,which will disable the searching capability of the Datatable including ColumnControl. Use thelayoutoption to remove the global search input and leave thesearchoption set totrueto keep the searching capability.Kevin
Hello,
thx !
After check my code again completly with live.datatables.net ... I sadly found out that I accidently loaded a Datatables with a Column Control included and I load it again as external plugin. That makes 2 appearances in the column header.
thx again !
Erik
Oh - that is interesting! I'll take a look and see if I can prevent that.
Allan