Skip to content

Commit 0db5de8

Browse files
Fixed the data-cy label for select option of menu (#2474)
1 parent ea7687e commit 0db5de8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/components/Select.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const CustomOption = props => {
8787
innerRef={ref}
8888
innerProps={{
8989
...props.innerProps,
90-
"data-cy": dataCy || `${props.hyphenatedDataCyLabel}-select-option`,
90+
"data-cy": dataCy || `${hyphenize(props.label)}-select-option`,
9191
}}
9292
/>
9393
);
@@ -101,7 +101,7 @@ const Placeholder = props => {
101101
{...props}
102102
innerProps={{
103103
...props.innerProps,
104-
"data-cy": selectProps
104+
"data-cy": selectProps?.hyphenatedDataCyLabel
105105
? `${selectProps.hyphenatedDataCyLabel}-select-placeholder`
106106
: "select-placeholder",
107107
}}

0 commit comments

Comments
 (0)