From 17bd25d5726e4938cc07006a6dad48869b4abbf8 Mon Sep 17 00:00:00 2001 From: Julietta Rozin Date: Mon, 13 Oct 2025 01:03:04 -0600 Subject: [PATCH 1/2] Change to auto focus text input for viz selection through useEffect --- .../components/controls/VizTypeControl/VizTypeGallery.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index 85236ca3a452..c3541484880a 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -447,6 +447,13 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) { ? mountedPluginMetadata[selectedViz] : null; + // Auto-focus the search input when the modal opens + useEffect(() => { + if (searchInputRef.current) { + searchInputRef.current.focus(); + } + }, []); + const chartMetadata: VizEntry[] = useMemo(() => { const result = Object.entries(mountedPluginMetadata) .map(([key, value]) => ({ key, value })) From 7178351d2c1b559a7423d98a3ddbf42484575233 Mon Sep 17 00:00:00 2001 From: Julietta Rozin Date: Mon, 13 Oct 2025 01:03:04 -0600 Subject: [PATCH 2/2] Change to auto focus text input for viz selection through useEffect --- .../components/controls/VizTypeControl/VizTypeGallery.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index c3541484880a..f9c8219a77c7 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -452,7 +452,7 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) { if (searchInputRef.current) { searchInputRef.current.focus(); } - }, []); + }, []); const chartMetadata: VizEntry[] = useMemo(() => { const result = Object.entries(mountedPluginMetadata)