Support for max-height (via css & maxTableHeight) & fixes/improvements
Includes some fixes brought in from @Dorian-Fusco's PR, but without dramatic changes to look/functionality of original directive.
From @Dorian-Fusco PR #13 :
- Less promiscuous selectors.
- Perform calculations on hidden clone rather than original element to prevent FOUCs.
Other fixes/improvements:
- Perform
transformTablewhen the number of rows of thetbodychange to accommodate scrollbar disappearing/reappearing with live data. Updated demo with example. - Perform
transformTableon throttled window resize so that the table columns aren't stuck at a maximum of their originally calculated size. - Increased
scrollBarWidthtrim to -4px. Testing the demo in several browsers/platforms seemed to indicate this was better than -2px. - Fix for IE9
trheight inheritance so that even though the directive fails it at least falls back to a normal looking table.
I found and fixed an additional issue:
If the first row in the tbody had colspan'd cells it wouldn't calculate the column widths correctly. It now finds the first row in the tbody that has the same number of columns as the thead with which to determine and apply preferred column width.
Found some additional issues with colspan'd cells. Ended up rewriting the section where widths are determined and applied.
- Loops through each of the table sections and applies width to every row’s cells directly from the equivalent cloned cell. This allows the proper width to be assigned to cells with colspan. Skips rows that have the same number of cells as the previous row for performance.
- Changed scrollBarWidth compensation to apply to all the last columns of the tbodies, not just the last column of the first row.
- Updated demo to show colspanning
Wow, sorry for so many updates but I discovered that I could optimize the transform function changes I made in the last commit to walk over less of the DOM.
This is a much better fix, I will delete my PR.
Are there any outstanding issues that are stopping this from being merged @brandonbird @cornflourblue ?
@drewfreyling I haven't seen anything from @cornflourblue.
@cornflourblue what is that status of this?
@cornflourblue this appears to be ready for merge, what is the hold up?
@cornflourblue is this project no longer active?
I guess it isn't.