mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
A11y: do not change the focus when switching between Viz/Suggestions/Library Panels views (#53814)
This commit is contained in:
parent
ce7593686d
commit
51d173711f
@ -1,5 +1,5 @@
|
|||||||
import { css } from '@emotion/css';
|
import { css } from '@emotion/css';
|
||||||
import React, { FC, useCallback, useEffect, useRef, useState } from 'react';
|
import React, { FC, useCallback, useRef, useState } from 'react';
|
||||||
import { useDispatch, useSelector } from 'react-redux';
|
import { useDispatch, useSelector } from 'react-redux';
|
||||||
import { useLocalStorage } from 'react-use';
|
import { useLocalStorage } from 'react-use';
|
||||||
|
|
||||||
@ -49,13 +49,6 @@ export const VisualizationSelectPane: FC<Props> = ({ panel, data }) => {
|
|||||||
[dispatch, panel]
|
[dispatch, panel]
|
||||||
);
|
);
|
||||||
|
|
||||||
// Give Search input focus when using radio button switch list mode
|
|
||||||
useEffect(() => {
|
|
||||||
if (searchRef.current) {
|
|
||||||
searchRef.current.focus();
|
|
||||||
}
|
|
||||||
}, [listMode]);
|
|
||||||
|
|
||||||
const onCloseVizPicker = () => {
|
const onCloseVizPicker = () => {
|
||||||
dispatch(toggleVizPicker(false));
|
dispatch(toggleVizPicker(false));
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user