A11y: do not change the focus when switching between Viz/Suggestions/Library Panels views (#53814)

This commit is contained in:
Polina Boneva 2022-08-22 12:12:39 +03:00 committed by GitHub
parent ce7593686d
commit 51d173711f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
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 { useLocalStorage } from 'react-use';
@ -49,13 +49,6 @@ export const VisualizationSelectPane: FC<Props> = ({ panel, data }) => {
[dispatch, panel]
);
// Give Search input focus when using radio button switch list mode
useEffect(() => {
if (searchRef.current) {
searchRef.current.focus();
}
}, [listMode]);
const onCloseVizPicker = () => {
dispatch(toggleVizPicker(false));
};