Skip to content

Commit

Permalink
Remove ref for stickyContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Lustig committed Feb 23, 2018
1 parent ae4ec25 commit c7c112e
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export class ScrollablePaneBase extends BaseComponent<IScrollablePaneProps, {}>

public refs: {
root: HTMLElement;
stickyContainer: HTMLElement;
stickyAbove: HTMLElement;
stickyBelow: HTMLElement;
};
Expand Down Expand Up @@ -58,19 +57,15 @@ export class ScrollablePaneBase extends BaseComponent<IScrollablePaneProps, {}>
}

public componentDidMount() {
const { root, stickyContainer } = this.refs;
const { root } = this.refs;

this._events.on(root, 'scroll', this.notifySubscribers);
this._events.on(window, 'resize', this._onWindowResize);
}

public componentWillUnmount() {
const { stickyContainer } = this.refs;
this._events.off(this.refs.root);
this._events.off(window);
if (stickyContainer.parentElement) {
stickyContainer.parentElement.removeChild(stickyContainer);
}
}

public render() {
Expand Down

0 comments on commit c7c112e

Please sign in to comment.