Skip to content

Commit 0c9d3bc

Browse files
corrects onCheckNewValue check (#820)
Signed-off-by: Mathieu DEHARBE <[email protected]>
1 parent 70b1bf6 commit 0c9d3bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/inputs/reactHookForm/autocompleteInputs/AutocompleteInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function AutocompleteInput({
5959
if (currentValue?.id === newValue) {
6060
return;
6161
}
62-
if (!onCheckNewValue?.(newValue)) {
62+
if (onCheckNewValue && !onCheckNewValue(newValue)) {
6363
return;
6464
}
6565
onChangeCallback?.();

0 commit comments

Comments
 (0)