Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
super.componentDidMount();
if (!this.props.scrollTarget) {
this.handleTargetScroll = this.foundation.handleTargetScroll.bind(
this.foundation
);
this.setScrollTarget(this.window);
}
this.navIcon =
this.root.ref &&
this.root.ref.querySelector(
MDCTopAppBarFoundation.strings.NAVIGATION_ICON_SELECTOR
);
this.handleNavigationClick = this.foundation.handleNavigationClick.bind(
this.foundation
);
this.navIcon &&
this.navIcon.addEventListener('click', this.handleNavigationClick);
}