Only reset keybindings on route change, not param change (#52746)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user