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

How to show (enable) the show/hide plus at all times.

$
0
0

Hi,

(versions: Bootstrap 3, Datatables 1.10.16, responsive 2.2.0, buttons 1.4.2)

I'm thinking that this should be easy and I'm simply missing some option. But I can't find it in any of the documentation or examples.

Ok, so my layout has many columns and by default more than half of them are hidden. ColVis plugin then allows different users to show/hide columns depending on their business needs.

I then use a renderer to display any unseen columns on the nested child area.

responsive: {
            details: {
                renderer: function (api, rowIdx, columns) {
                    return format(columns);
                }
            }
        }

Then I do a check to see if 1) the column is hidden or 2) not visible to print the information not visible on the row.

if (c[0].hidden === true || dtbl.column(0).visible() === false) { *print info about first column* }

or, if I know this particular column sometimes doesn't have any data:

if ((c[17].hidden === true || dtbl.column(17).visible() === false) && c[17].data) { *print information about the 16th column* }

My problem is that when the visible columns fill the screen, it disables the child function and hides the blue (bootstrap) plus icon. But the user may have 8 columns simply hidden since he/she doesn't have to reference them that often.

So I want to somehow to tell the responsive plugin to simply always keep the show/hide click action enabled.

Any quick way to enable this?

Regards


Viewing all articles
Browse latest Browse all 82037

Trending Articles



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