Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82446

How to set "active" property of a extended columnVisibility button for all-columns-visible action ?

$
0
0

I just want to ask if there is a way of dataTable way of this ?
I have column visibility button group like the following (generated from the following php code, I think you can guess that what is like in js)


    [
        'extend'         => 'colvis',
        'columns'        => ':gt(0)',
        'postfixButtons' => [
          'colvisRestore',

          [ 
            'extend'     => 'columnVisibility',     //  Button Show All   
            'className'  => 'buttons-columnVisibility-showAll',
            'text'       => 'function (dt) { return dt.i18n(\'buttons.columnVisibilityAll\', \'Show All Columns\'); }'
            'visibility' => true,
          ],
        ],

      ]

This button (last one) has always get the "active" class when it is rendered, but it is not bound to a column but columns, there is no indicator that it is activated or else in my opinion;
so my question is whether there is a "chic" dataTable way of achieving to activate (get active class or not) only when it has some certain condition ?

Any comments will be greatly appreciated.
Regards,


Viewing all articles
Browse latest Browse all 82446

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>