Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentDidMount() {
this.popoverEl = this.popoverRef.current;
this.scrollParents = getScrollParents(this.popoverEl);
this.scrollParents.forEach((scrollParent) => scrollParent.addEventListener('scroll', this.handleScroll));
}