How to use the nav-frontend-js-utils.getScrollParents function in nav-frontend-js-utils

To help you get started, we’ve selected a few nav-frontend-js-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github navikt / nav-frontend-moduler / packages / node_modules / nav-frontend-popover / src / popover.tsx View on Github external
componentDidMount() {
        this.popoverEl = this.popoverRef.current;
        this.scrollParents = getScrollParents(this.popoverEl);
        this.scrollParents.forEach((scrollParent) => scrollParent.addEventListener('scroll', this.handleScroll));
    }