Skip to content

Commit

Permalink
[v9.3.x] Explore: Be sure time range key bindings are mounted after c…
Browse files Browse the repository at this point in the history
…lear (#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 commit 0927073.

* Clear keybindings before component render

(cherry picked from commit 6ab79c4)

Co-authored-by: Kristina <kristina.durivage@grafana.com>
  • Loading branch information
grafanabot and gelicia committed Jan 24, 2023
1 parent 47f924d commit 9d5b13b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions public/app/core/navigation/GrafanaRoute.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Suspense, useEffect } from 'react';
import React, { Suspense, useEffect, useLayoutEffect } from 'react';
// @ts-ignore
import Drop from 'tether-drop';

Expand All @@ -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);
Expand Down

0 comments on commit 9d5b13b

Please sign in to comment.