Closed CCvinc closed 5 years ago
It seems we have to loop over them with a reversed for-loop:
$headerCells.each(function(index) {
var $t = $(this),
isPersist = $t.is('[data-tablesaw-priority="persist"]');
persist.push(isPersist);
sum += headerWidths[index];
sums.push(sum);
// is persistent or is hidden
if (isPersist || sum > containerWidth) {
visibleNonPersistantCount--;
}
});
$($headerCells).get().reverse().each
would be a first step.
This repository is now using lodash style issue management for enhancements. This means enhancement issues will now be closed instead of leaving them open.
The enhancement backlog can be found here: https://github.com/filamentgroup/tablesaw/issues?utf8=%E2%9C%93&q=label%3Aneeds-votes+sort%3Areactions-%2B1-desc+
Don’t forget to upvote the top comment with 👍!
I'm going to explain what i'm looking for with examples. I hope you will better understand.
With a small window, here is the current load of the Swipe table (DEMO)
Columns A and B are displayed. C/D/E are hidden.
With a small window, here is what i'm looking for (directly when the table is loaded)
Columns A and E are displayed. B/C/D are hidden.
In fact i just want to change the "hiding order" when the window is resized. B must be the 1st column hiden. Then C must be the 2nd column hiden. etc... And if the window is really too small, E is also hidden... and only the column A is displayed.
I hope my request is now better understund. Sorry if i'm a little bit boring...
Best regards, Vincent.
Previous issue : #273