[v9.3.x] Explore: Be sure time range key bindings are mounted after clear (#62020)
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 commit092707371d. * Clear keybindings before component render (cherry picked from commit6ab79c4fba) Co-authored-by: Kristina <kristina.durivage@grafana.com>
This commit is contained in:
co-authored by
Kristina
parent
47f924d915
commit
9d5b13b565
@@ -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