Skip to content
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

[refactor] Use position: sticky; for fixed headers/footers/columns #504

Merged
merged 2 commits into from
Apr 12, 2018

Conversation

pzuraq
Copy link
Contributor

@pzuraq pzuraq commented Apr 12, 2018

This PR switches us to a rendering strategy using position: sticky;
in all modern browsers. This is much more performant and simpler in the
code, and maintains semantic table structure - everything we've been
after!

For IE11, the only browser we support which does not support sticky, we
use a rudimentary polyfill. The polyfill is not comprehensive, it only
solves our exact use case by using translateX/Y on scroll.

}

export function teardownStickyPolyfill(component) {
component.element.removeEventListener('scroll', component._repositionHandler);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to detach all resize sensors in the teardown.

super.willDestroyElement(...arguments);
}

getChildElement(tagName) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed

@billy-addepar
Copy link
Contributor

🎉

With this the table automatically supports text wrapping 😄

billy-addepar and others added 2 commits April 12, 2018 14:41
This PR switches us to a rendering strategy using position: sticky;
in all modern browsers. This is much more performant and simpler in the
code, and maintains semantic table structure - everything we've been
after!

For IE11, the only browser we support which does not support sticky, we
use a rudimentary polyfill. The polyfill is not comprehensive, it only
solves our exact use case by using `translateX/Y` on scroll.
@pzuraq pzuraq force-pushed the pzuraq/new-table-css branch from 4752ef4 to f9dbff6 Compare April 12, 2018 21:42
@pzuraq pzuraq merged commit ecdbc2d into master Apr 12, 2018
@pzuraq pzuraq deleted the pzuraq/new-table-css branch April 12, 2018 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants