Adding autocomplete custom change
This commit is contained in:
parent
316998f5f7
commit
1d86cf1fe1
|
|
@ -84,9 +84,12 @@ export function AutocompleteSelect<T>({ title, titleProps = null, data, nullable
|
||||||
}
|
}
|
||||||
onChange={(value) => {
|
onChange={(value) => {
|
||||||
// If value is an object (from internalData lookup), store only the primitive .value
|
// If value is an object (from internalData lookup), store only the primitive .value
|
||||||
field.onChange({ target: { value, name: field.name } });
|
const event = { target: { value, name: field.name } };
|
||||||
}
|
field.onChange(event);
|
||||||
}
|
if (props.onChange) {
|
||||||
|
(props.onChange as any)(event);
|
||||||
|
}
|
||||||
|
}}
|
||||||
nullable={nullable as any}
|
nullable={nullable as any}
|
||||||
>
|
>
|
||||||
<div css={[title && tw`my-1`, tw`relative`]} >
|
<div css={[title && tw`my-1`, tw`relative`]} >
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user