@bombillazo/rhf-plus 7.56.1-plus.0 → 7.56.1-plus.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -133,6 +133,7 @@ const INPUT_VALIDATION_RULES = {
133
133
  };
134
134
 
135
135
  const HookFormContext = React__default.createContext(null);
136
+ HookFormContext.displayName = 'HookFormContext';
136
137
  /**
137
138
  * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.
138
139
  *
@@ -453,12 +454,7 @@ function useController(props) {
453
454
  const ref = React__default.useCallback((elm) => {
454
455
  const field = get(control._fields, name);
455
456
  if (field && elm) {
456
- field._f.ref = {
457
- focus: () => elm.focus(),
458
- select: () => elm.select(),
459
- setCustomValidity: (message) => elm.setCustomValidity(message),
460
- reportValidity: () => elm.reportValidity(),
461
- };
457
+ field._f.ref = elm;
462
458
  }
463
459
  }, [control._fields, name]);
464
460
  const field = React__default.useMemo(() => ({