refactor(FE-Storyless): conditionally handle onChange prop in SelectInput for better flexibility

This commit is contained in:
rstubryan
2025-10-28 08:58:01 +07:00
parent c74ed18a16
commit 7da95b80b0
+1 -1
View File
@@ -146,7 +146,7 @@ const SelectInput = <T extends OptionType>(props: SelectInputProps<T>) => {
<SelectComponent<T, boolean, GroupBase<T>> <SelectComponent<T, boolean, GroupBase<T>>
instanceId='select' instanceId='select'
value={value ?? (isMulti ? [] : null)} value={value ?? (isMulti ? [] : null)}
onChange={handleChange} onChange={onChange ? handleChange : undefined}
options={options} options={options}
menuIsOpen={openMenu} menuIsOpen={openMenu}
inputValue={internalInputValue} inputValue={internalInputValue}