From cbfdc8ce636775ea4b61545af21f24e66afcac4d Mon Sep 17 00:00:00 2001 From: Anel Date: Fri, 19 Sep 2025 20:10:50 -0500 Subject: [PATCH] Added the data-testid prop to the selectContainer Root Container --- packages/react-select/src/Select.tsx | 2 ++ packages/react-select/src/components/containers.tsx | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/react-select/src/Select.tsx b/packages/react-select/src/Select.tsx index 146d084e20..4c438e464e 100644 --- a/packages/react-select/src/Select.tsx +++ b/packages/react-select/src/Select.tsx @@ -137,6 +137,8 @@ export interface Props< components: SelectComponentsConfig; /** Whether the value of the select, e.g. SingleValue, should be displayed in the control. */ controlShouldRenderValue: boolean; + /** Testing id applied to the outer Select container */ + 'data-testid'?: string; /** Delimiter used to join multiple values into a single HTML Input value */ delimiter?: string; /** Clear all values when the user presses escape AND the menu is closed */ diff --git a/packages/react-select/src/components/containers.tsx b/packages/react-select/src/components/containers.tsx index e673cb384a..31a1483813 100644 --- a/packages/react-select/src/components/containers.tsx +++ b/packages/react-select/src/components/containers.tsx @@ -45,7 +45,7 @@ export const SelectContainer = < >( props: ContainerProps ) => { - const { children, innerProps, isDisabled, isRtl } = props; + const { children, innerProps, isDisabled, isRtl, selectProps } = props; return (
{children}