Skip to content

Commit dc8225b

Browse files
committed
fix: pass onCreateOption handler
1 parent 2fcbde6 commit dc8225b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Shared/Components/SelectPicker/SelectPicker.component.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,12 @@ const SelectPicker = ({
199199
...props
200200
}: SelectPickerProps) => {
201201
const { inputId, required, isDisabled, controlShouldRenderValue, value } = props
202-
const { isCreatable = false, isGroupHeadingSelectable = false, getIsOptionValid = () => true } = multiSelectProps
202+
const {
203+
isCreatable = false,
204+
isGroupHeadingSelectable = false,
205+
getIsOptionValid = () => true,
206+
onCreateOption,
207+
} = multiSelectProps
203208

204209
// Only large variant is supported for multi select picker
205210
const selectSize = isMulti && !controlShouldRenderValue ? ComponentSizeType.large : size
@@ -337,6 +342,7 @@ const SelectPicker = ({
337342
hideSelectedOptions={false}
338343
isValidNewOption={isValidNewOption}
339344
createOptionPosition="first"
345+
onCreateOption={onCreateOption}
340346
/>
341347
) : (
342348
<ReactSelect<SelectPickerOptionType, false>

0 commit comments

Comments
 (0)