Skip to content

Commit

Permalink
Fixed updating value on blur of NumericInput.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuznietsov committed Oct 9, 2023
1 parent d31a824 commit 8126904
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion uui-components/src/inputs/NumericInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ export function NumericInput(props: NumericInputProps) {
inputRef.current.value = '';
} else {
const validatedValue = getMinMaxValidatedValue({ value, min, max });
if (validatedValue !== props.value) props.onValueChange(validatedValue);
if (validatedValue !== props.value && (validatedValue != null || props.value != null)) {
props.onValueChange(validatedValue);
}
}

props.onBlur?.(event);
Expand Down

0 comments on commit 8126904

Please sign in to comment.