mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: Be sure time range key bindings are mounted after clear (#61892)
* Add list of bindings for updating on change
* Revert "Add list of bindings for updating on change"
This reverts commit 092707371d.
* Clear keybindings before component render
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { Suspense, useEffect } from 'react';
|
||||
import React, { Suspense, useEffect, useLayoutEffect } from 'react';
|
||||
// @ts-ignore
|
||||
import Drop from 'tether-drop';
|
||||
|
||||
@@ -18,9 +18,11 @@ export function GrafanaRoute(props: Props) {
|
||||
|
||||
chrome.setMatchedRoute(props.route);
|
||||
|
||||
useEffect(() => {
|
||||
useLayoutEffect(() => {
|
||||
keybindings.clearAndInitGlobalBindings();
|
||||
}, [keybindings]);
|
||||
|
||||
useEffect(() => {
|
||||
updateBodyClassNames(props.route);
|
||||
cleanupDOM();
|
||||
navigationLogger('GrafanaRoute', false, 'Mounted', props.match);
|
||||
|
||||
Reference in New Issue
Block a user