-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide initially a column even for important table's width #964
Comments
Huh, what are you trying to achieving? Hiding it through jQueryMobile's Column Selector plugin or tablesorter's column selector widget? These two work quite differently and former might cause problems with tablesorter so I would advise against using it with tablesorter tables. |
Hi @fab-girard! You're correct. Setting the column in the $(function () {
/*** custom css only button popup ***/
$(".custom-popup").tablesorter({
theme: 'blue',
widgets: ['zebra', 'columnSelector'],
widgetOptions: {
// target the column selector markup
columnSelector_container: $('#columnSelector'),
// column status, true = display, false = hide
// disable = do not display on list
columnSelector_columns: {
2: false /* start with Sex column hidden */
},
/* Responsive Media Query settings */
// breakpoints checkbox initial setting
columnSelector_mediaqueryState: false
}
});
}); |
@Herst I do use |
Hello, I think it would be interesting to hide always some columns initially in the table when 'auto' is selected in columnSelector and whatever the width of the table is. Regards, |
Then that would defeat the purpose of using "auto" which is using media queries to toggle column visibility... Maybe set the desired column's priority to 7... <th data-priority="7">Foo</th> then it will be hidden first in narrow browser windows. You can also set the width at which priority 7 columns become hidden using the If you want a column to always be hidden, then add some css: /* hide the 3rd column (one-based indexing) */
table tr th:nth-child(3),
table tr td:nth-child(3) {
display: none;
} |
Hello, data-priority="7" seems not to be taken into account... even if I had a columnSelector_breakpoint options. Modifying the css is not corresponding to what I expect : the column is always hidden and it is not possible to display it even with column selector and auto mode to off. Thanks for your previous suggestion, |
I guess it wouldn't hurt to initially hide selected columns. I'll look into it. |
Hi, I don't know if its you are still planning to do it but this function would be very useful to me too! Thanks |
In the master branch, the columnSelector widget has been updated with a new option When |
Hello,
I've a problem with "columnSelector-false" class attribute on tablesorter from Mottie's fork.
In my case, "columnSelector-false" seems not working (or I don't understand how it should work). In fact columns are hidden only if I add "data-priority" with a value AND table's width is smaller than max-width defined here : http://view.jquerymobile.com/1.3.2/dist/demos/widgets/table-column-toggle/ And in that case I don't need to add class="columnSelector-false".
I would think writing :
was sufficient to hide initially a column but it is not the case.
Event on demo page : https://mottie.github.io/tablesorter/docs/example-widget-column-selector.html the sex column is not hidden by default if table's width is greater than 1120px. What I was expected to get is : if I add class="columnSelector-false" the column should be hidden by default, whatever the width of the table. On jsfiddle, the table's width is not important: the column are hidden thanks to "data-priority".
Regards, Fabien
The text was updated successfully, but these errors were encountered: