From 3f749c6d18654b11ec23fbc3594d9645d15c0df8 Mon Sep 17 00:00:00 2001 From: nickofthyme Date: Fri, 23 Aug 2024 09:15:58 -0700 Subject: [PATCH 1/2] Focus selectable search inputs in dropdowns --- .../unified_search/public/dataview_picker/dataview_list.tsx | 1 + .../editor_frame/config_panel/chart_switch/chart_switch.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/plugins/unified_search/public/dataview_picker/dataview_list.tsx b/src/plugins/unified_search/public/dataview_picker/dataview_list.tsx index 003f8181bfefb..559174711af3b 100644 --- a/src/plugins/unified_search/public/dataview_picker/dataview_list.tsx +++ b/src/plugins/unified_search/public/dataview_picker/dataview_list.tsx @@ -149,6 +149,7 @@ export function DataViewsList({ searchProps={{ id: searchListInputId, compressed: true, + autoFocus: true, placeholder: strings.editorAndPopover.search.getSearchPlaceholder(), 'data-test-subj': 'indexPattern-switcher--input', ...(selectableProps ? selectableProps.searchProps : undefined), diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.tsx index 9fd7295993107..b3aa8300d2e7e 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.tsx @@ -405,6 +405,7 @@ export const ChartSwitch = memo(function ChartSwitch({ isPreFiltered data-test-subj="lnsChartSwitchList" searchProps={{ + autoFocus: true, className: 'lnsChartSwitch__search', 'data-test-subj': 'lnsChartSwitchSearch', onChange: (value) => setSearchTerm(value), From ee95c9cd359be09257156cf2dd69502e15951271 Mon Sep 17 00:00:00 2001 From: Marta Bondyra <4283304+mbondyra@users.noreply.github.com> Date: Mon, 26 Aug 2024 22:29:05 +0200 Subject: [PATCH 2/2] Update x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.tsx --- .../editor_frame/config_panel/chart_switch/chart_switch.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.tsx index b3aa8300d2e7e..9fd7295993107 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/chart_switch/chart_switch.tsx @@ -405,7 +405,6 @@ export const ChartSwitch = memo(function ChartSwitch({ isPreFiltered data-test-subj="lnsChartSwitchList" searchProps={{ - autoFocus: true, className: 'lnsChartSwitch__search', 'data-test-subj': 'lnsChartSwitchSearch', onChange: (value) => setSearchTerm(value),