Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
componentWillUpdate(nextProps, nextState) {
//if (nextState.isOpen) return screenreaderTrap.trap(this.dropdown);
//if (!nextState.isOpen) return screenreaderTrap.untrap();
return nextState.isOpen ? screenreaderTrap.trap(this.dropdown) : screenreaderTrap.untrap();
}
componentWillUpdate(nextProps, nextState) {
return nextState.isOpen ? screenreaderTrap.trap(this.dropdown) : screenreaderTrap.untrap();
}