mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Only reset keybindings on route change, not param change (#52746)
This commit is contained in:
parent
0e13ee345d
commit
3ac5dfec42
@ -19,9 +19,6 @@ export function GrafanaRoute(props: Props) {
|
||||
|
||||
updateBodyClassNames(props.route);
|
||||
cleanupDOM();
|
||||
// unbinds all and re-bind global keybindins
|
||||
keybindingSrv.reset();
|
||||
keybindingSrv.initGlobals();
|
||||
reportPageview();
|
||||
navigationLogger('GrafanaRoute', false, 'Mounted', props.match);
|
||||
|
||||
@ -31,6 +28,12 @@ export function GrafanaRoute(props: Props) {
|
||||
};
|
||||
}, [chrome, props.route, props.match]);
|
||||
|
||||
useEffect(() => {
|
||||
// unbinds all and re-bind global keybindins
|
||||
keybindingSrv.reset();
|
||||
keybindingSrv.initGlobals();
|
||||
}, [chrome, props.route]);
|
||||
|
||||
useEffect(() => {
|
||||
cleanupDOM();
|
||||
reportPageview();
|
||||
|
Loading…
Reference in New Issue
Block a user