From 44af65da8c341690b0598409be76360df0c07e9e Mon Sep 17 00:00:00 2001 From: Richard Lindhout Date: Sun, 21 May 2023 14:31:48 +0200 Subject: [PATCH] fix: don't use ref for raw --- src/useInputs.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/useInputs.ts b/src/useInputs.ts index ca19dc1..3452a5c 100644 --- a/src/useInputs.ts +++ b/src/useInputs.ts @@ -126,7 +126,6 @@ export function useInputs({ const baseProps: InputT = (k, h) => { updateErrorHandler(k, h); return removeEmpty({ - ...context.referencer(k, context.formIndex), testID: k, onLayout: onLayoutKey(k), onBlur: blur(k, h), @@ -137,6 +136,7 @@ export function useInputs({ }; const text: InputT = (k, h) => ({ + ...context.referencer(k, context.formIndex), ...baseProps(k, h), value: deepGet(values.current, k) || '', onChangeText: referencedCallback( @@ -147,6 +147,7 @@ export function useInputs({ const numberRawCreator = useNumberRaw({ locale, referencedCallback }); const numberRaw: InputT = (k, h) => ({ + ...context.referencer(k, context.formIndex), ...baseProps(k, h), ...numberRawCreator(k, h, values.current, changeValue), });