From ccfe29e83fb06c47fcb82057ffa67f09b8b48e97 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Wed, 8 Apr 2026 16:28:13 -0700 Subject: [PATCH] fix(tags): fix Bulk tag modal dropdown clipping and stale tag cache (#39210) Co-authored-by: Claude Opus 4.6 (cherry picked from commit d915e4f3ff7b892737ec99cbee694dadc1ebf460) --- superset-frontend/src/components/Tag/utils.tsx | 11 +---------- superset-frontend/src/features/tags/BulkTagModal.tsx | 3 ++- superset-frontend/src/features/tags/TagModal.tsx | 3 +++ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/superset-frontend/src/components/Tag/utils.tsx b/superset-frontend/src/components/Tag/utils.tsx index 75cc840fa45..1ef7741b7c7 100644 --- a/superset-frontend/src/components/Tag/utils.tsx +++ b/superset-frontend/src/components/Tag/utils.tsx @@ -26,15 +26,6 @@ import { import type { TagType } from 'src/types/TagType'; import rison from 'rison'; -import { cacheWrapper } from 'src/utils/cacheWrapper'; - -const localCache = new Map(); - -const cachedSupersetGet = cacheWrapper( - SupersetClient.get, - localCache, - ({ endpoint }) => endpoint || '', -); type SelectTagsValue = { value: number | undefined; @@ -75,7 +66,7 @@ export const loadTags = async ( return errorText; }; - return cachedSupersetGet({ + return SupersetClient.get({ endpoint: `/api/v1/tag/?q=${query}`, }) .then(response => { diff --git a/superset-frontend/src/features/tags/BulkTagModal.tsx b/superset-frontend/src/features/tags/BulkTagModal.tsx index 76ce8730cf9..46adac21021 100644 --- a/superset-frontend/src/features/tags/BulkTagModal.tsx +++ b/superset-frontend/src/features/tags/BulkTagModal.tsx @@ -125,7 +125,7 @@ const BulkTagModal: FC = ({
{t('You are adding tags to %s %ss', selected.length, resourceName)}
- {t('tags')} + {t('Tags')} = ({ onHide={onHide} // @ts-expect-error onChange={tags => setTags(tags)} + getPopupContainer={() => document.body} placeholder={t('Select Tags')} mode="multiple" /> diff --git a/superset-frontend/src/features/tags/TagModal.tsx b/superset-frontend/src/features/tags/TagModal.tsx index 53b059a4425..20736d4610c 100644 --- a/superset-frontend/src/features/tags/TagModal.tsx +++ b/superset-frontend/src/features/tags/TagModal.tsx @@ -332,6 +332,7 @@ const TagModal: FC = ({ onChange={value => handleOptionChange(TaggableResources.Dashboard, value) } + getPopupContainer={() => document.body} header={{t('Dashboards')}} allowClear /> @@ -344,6 +345,7 @@ const TagModal: FC = ({ value={chartsToTag} options={loadCharts} onChange={value => handleOptionChange(TaggableResources.Chart, value)} + getPopupContainer={() => document.body} header={{t('Charts')}} allowClear /> @@ -358,6 +360,7 @@ const TagModal: FC = ({ onChange={value => handleOptionChange(TaggableResources.SavedQuery, value) } + getPopupContainer={() => document.body} header={{t('Saved queries')}} allowClear />