Skip to content

Commit

Permalink
[DDW-16] Revert preload removal
Browse files Browse the repository at this point in the history
  • Loading branch information
thedanheller committed Oct 20, 2020
1 parent 9b2f819 commit 48fd290
Showing 1 changed file with 12 additions and 2 deletions.
Expand Up @@ -149,12 +149,22 @@ export class StakePoolsTable extends Component<Props, State> {

searchInput: ?HTMLElement = null;

_isMounted = false;

scrollableDomElement: ?HTMLElement = null;

searchInput: ?HTMLElement = null;

componentDidMount() {
this.setState({ isPreloading: false });
this._isMounted = true;
setTimeout(() => {
if (this._isMounted) this.setState({ isPreloading: false });
}, 0);
}

componentWillUnmount() {
window.removeEventListener('resize', this.handleCloseTooltip);
this._isMounted = false;
window.removeEventListener('resize', this.handleClose);
this.scrollableDomElement = document.querySelector(
`.${this.props.containerClassName}`
);
Expand Down

0 comments on commit 48fd290

Please sign in to comment.