From 41b1454d616a400dd13096218970a0b0e5dc5080 Mon Sep 17 00:00:00 2001 From: Aleksandras Sukelovic Date: Tue, 12 Sep 2023 18:06:24 +0300 Subject: [PATCH] Small fix --- packages/x/src/useIntegerField.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/x/src/useIntegerField.ts b/packages/x/src/useIntegerField.ts index b2a9b55c..8800b467 100644 --- a/packages/x/src/useIntegerField.ts +++ b/packages/x/src/useIntegerField.ts @@ -29,12 +29,12 @@ export const useIntegerField = ({ const parse = useCallback( (text: string) => { + text = text.trim(); + if (customParse) { return customParse(text); } - text = text.trim(); - if (text.length === 0) { return null; }