From c87cefbb56e045cfd384ef43ff3c9806fdca81ca Mon Sep 17 00:00:00 2001
From: Enzo Martellucci <52219496+EnxDev@users.noreply.github.com>
Date: Mon, 30 Mar 2026 15:52:37 +0200
Subject: [PATCH] fix(select): ensure filter dropdown matches input field width
(#38886)
(cherry picked from commit 41d401a879e58ccb2aa3ec195646d2485b4b986d)
---
.../src/components/Select/Select.test.tsx | 32 +++++++++++++++++++
.../src/components/Select/Select.tsx | 2 +-
2 files changed, 33 insertions(+), 1 deletion(-)
diff --git a/superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx b/superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx
index e0383d82558..d7c00084d92 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/components/Select/Select.test.tsx
@@ -915,6 +915,38 @@ test('"Select all" does not affect disabled options', async () => {
expect(await findSelectValue()).not.toHaveTextContent(options[1].label);
});
+test('dropdown takes full width of the select input for multi select', async () => {
+ render(
+
+
+
,
+ );
+ await open();
+ const dropdown = document.querySelector(
+ '.ant-select-dropdown',
+ ) as HTMLElement;
+ expect(dropdown).toBeInTheDocument();
+ // When popupMatchSelectWidth is true, antd dynamically matches the
+ // trigger width and does not set a fixed inline width on the dropdown.
+ const widthValue = parseInt(dropdown.style.width, 10);
+ expect(Number.isNaN(widthValue) || widthValue === 0).toBe(true);
+});
+
+test('dropdown takes full width of the select input for single select', async () => {
+ render(
+