[Bug] Bad column width when some of the columns are collapsed (hidden) #84
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've applied this plugin to a table with:
So the markup:
Which will display:
Then I added 3 tabs (Product1, Product2, Product3) which with some js (twitter bootstrap's tab) add/remove the
active
class from cells (so you can hide "product1" column and show "product2" column instead).However, the "padding-right" that was applied to last cell approach does not work, when some cells are hidden. The cell widths are not correct. Eg:
Since dynamicaly adding/removeing padding from visible/hidden cells would be a pain in the ass and could cause more problems, instead I've moved the padding to the div wrapper which solves the problem.
Ofcourse, this makes the scrollbar appear "outside" the table, but that could be fixed by applying borders to
fht-table-wrapper
and removeing outer borders from thetable
.