Skip to content

Commit

Permalink
fix: don't use ref for raw
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLindhout committed May 21, 2023
1 parent c963302 commit 44af65d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/useInputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ export function useInputs<T>({
const baseProps: InputT<FormInputBaseProps> = (k, h) => {
updateErrorHandler(k, h);
return removeEmpty({
...context.referencer(k, context.formIndex),
testID: k,
onLayout: onLayoutKey(k),
onBlur: blur(k, h),
Expand All @@ -137,6 +136,7 @@ export function useInputs<T>({
};

const text: InputT<FormTextInputProps> = (k, h) => ({
...context.referencer(k, context.formIndex),
...baseProps(k, h),
value: deepGet(values.current, k) || '',
onChangeText: referencedCallback(
Expand All @@ -147,6 +147,7 @@ export function useInputs<T>({

const numberRawCreator = useNumberRaw<T>({ locale, referencedCallback });
const numberRaw: InputT<FormTextInputProps> = (k, h) => ({
...context.referencer(k, context.formIndex),
...baseProps(k, h),
...numberRawCreator(k, h, values.current, changeValue),
});
Expand Down

0 comments on commit 44af65d

Please sign in to comment.