integration colvis button and responsive extension
integration colvis button and responsive extension
Hi all.
In my use of datatable, I need the colvis button (to manage columns visibility) and the responsive extension (because I have a lot of colomns in my table).
I noticed that, completly randomly, when I toggle some colomns visibility (for example I hide then re-show the same colomn without closing the modal colomn selection view), some colomns are suddently colopsed under the + responsive item (but it is not normal , they shouldn't be, because they were not in the begining).
If someone knows how to correct this behaviour , I would be grateful.
I noticed that when recharging the page (after chosing my coloms visibility through the colvis button), the responsive extension acted back normaly. I had then the idea the reload the window (window.location.reload();) after the closure of the colvis modal window (colomn selection), but I don't know how I can do that without affecting the normal behaviour of the colvis button. If I put an action option, that will take place of the normal behaviour of the colvis button. And I don't know how to call the original behaviour of the colvis button inside an action option.
I would think of something like that :
{
extend: 'colvis',
action: function ( e, dt, node, config ) {
<here call the default behaviour of the colvis button> <== I don't know how to do that. If someone can help me. Thanks.
window.location.reload();
}
}
Thank you for your help