Skip to content

Commit 99e4e41

Browse files
committed
feat: add required prop and default filterable value to SingleSelectField component
1 parent 2816448 commit 99e4e41

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/core_modules/capture-core/components/FormFields/New/Fields/SingleSelectField/SingleSelectField.component.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type Props = {
1616
onFocus?: (value: string | null) => void;
1717
options: Option[];
1818
disabled?: boolean;
19-
// required?: boolean;
19+
required?: boolean;
2020
placeholder?: string;
2121
filterable?: boolean;
2222
clearable?: boolean;
@@ -33,8 +33,9 @@ const SingleSelectFieldComponentPlain = ({
3333
onFocus,
3434
options,
3535
disabled,
36+
required,
3637
placeholder,
37-
filterable,
38+
filterable = true,
3839
clearable = true,
3940
dataTest,
4041
}: Props) => {
@@ -74,6 +75,7 @@ const SingleSelectFieldComponentPlain = ({
7475
placeholder={placeholder}
7576
clearable={clearable}
7677
filterable={filterable}
78+
aria-required={required}
7779
onChange={handleChange}
7880
onBlur={handleBlur}
7981
onFocus={handleFocus}

0 commit comments

Comments
 (0)