Colvis Button - Dropdown don't working correctly
Colvis Button - Dropdown don't working correctly
gilthayllor
Posts: 2Questions: 1Answers: 0
When I click the colvis button, the list appears correctly, when I click to close, it closes, but if I click to open again, it opens and closes quickly.
When I click on another button, the list opens normally.
This discussion has been closed.
Answers
This example seems to work correctly:
https://datatables.net/extensions/buttons/examples/column_visibility/simple.html
Maybe you can provide a link to your page or a test case showing the issue?
Kevin
I recorded the screen of my computer and uploaded it on youtube: https://youtu.be/jsP3E3w3t9U
The code of my button:
"buttons": [
{
"extend": 'colvis',
'text': '<button class="btn btn-default" id="btnColvis" style="margin-right:0px !important;background-color:inherit;">Colunas <span class= "fa fa-caret-down" aria-hidden="true" style="margin-bottom:3px;"></span></button>',
"columns": ':not(.noVis)',
},
I started a test case for you using the above code:
http://live.datatables.net/nexabese/1/edit
It seems to work correctly. However there are a few differences. I'm assuming you are using Bootstrap since you have
btn
andbtn-default
but it doesn't look like you are loading all of the Datatables Bootstrap integration files - which probably isn't the problem.Also it looks like you have checkboxes to indicate column visibility which my example doesn't. How are you achieving that?
Do you see any errors in your browser's console?
There must be something in your environment causing the issue. Can you update my example to show the issue?
Kevin