mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Logs Popover Menu: close menu on right click (#78674)
LogRows: close menu on right click
This commit is contained in:
parent
98c7c149cd
commit
5db420619d
@ -121,6 +121,7 @@ class UnThemedLogRows extends PureComponent<Props, State> {
|
||||
selectedRow: row,
|
||||
});
|
||||
document.addEventListener('click', this.handleDeselection);
|
||||
document.addEventListener('contextmenu', this.handleDeselection);
|
||||
return true;
|
||||
};
|
||||
|
||||
@ -138,6 +139,7 @@ class UnThemedLogRows extends PureComponent<Props, State> {
|
||||
|
||||
closePopoverMenu = () => {
|
||||
document.removeEventListener('click', this.handleDeselection);
|
||||
document.removeEventListener('contextmenu', this.handleDeselection);
|
||||
this.setState({
|
||||
selection: '',
|
||||
popoverMenuCoordinates: { x: 0, y: 0 },
|
||||
@ -160,6 +162,7 @@ class UnThemedLogRows extends PureComponent<Props, State> {
|
||||
|
||||
componentWillUnmount() {
|
||||
document.removeEventListener('click', this.handleDeselection);
|
||||
document.removeEventListener('contextmenu', this.handleDeselection);
|
||||
if (this.renderAllTimer) {
|
||||
clearTimeout(this.renderAllTimer);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user