mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
removed the event listener on will unmount instead of adding it again. (#25844)
This commit is contained in:
parent
8f66f5b1ca
commit
7f587b209f
@ -35,7 +35,7 @@ export class ClickOutsideWrapper extends PureComponent<Props, State> {
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener('click', this.onOutsideClick, false);
|
||||
if (this.props.includeButtonPress) {
|
||||
window.addEventListener('keyup', this.onOutsideClick, false);
|
||||
window.removeEventListener('keyup', this.onOutsideClick, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user