Update src/components/NumberInput/NumberInput.tsx

Co-authored-by: Timothy Z. <timothy@stremio.com>
This commit is contained in:
Botsy 2025-02-13 12:37:36 +02:00 committed by GitHub
parent 675328ca08
commit 6999ef6a8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,7 +26,7 @@ const NumberInput = forwardRef<HTMLInputElement, Props>(({ defaultValue, showBut
const onKeyDown = useCallback((event: KeyboardEvent<HTMLInputElement>) => {
props.onKeyDown && props.onKeyDown(event);
if (event.key === 'Enter' ) {
if (event.key === 'Enter') {
props.onSubmit && props.onSubmit(event);
}
}, [props.onKeyDown, props.onSubmit]);