on change instead of on select in entitypicker

Signed-off-by: lukzerom <lukzerom@gmail.com>
This commit is contained in:
lukzerom
2021-12-14 17:51:02 +01:00
parent faaa7f009c
commit 31c0106a4e
@@ -57,9 +57,9 @@ export const EntityPicker = ({
useEffect(() => {
if (entityRefs?.length === 1) {
onSelect('', entityRefs[0]);
onChange(entityRefs[0]);
}
}, [entityRefs, onSelect]);
}, [entityRefs, onChange]);
return (
<FormControl