Socket
Socket
Sign inDemoInstall

react-hook-form

Package Overview
Dependencies
Maintainers
1
Versions
1030
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-hook-form - npm Package Compare versions

Comparing version 2.0.0-beta.2 to 2.0.0-beta.3

13

dist/index.es.js

@@ -333,3 +333,3 @@ import { useRef, useState, useEffect } from 'react';

}
const inputData = Object.assign({}, data, { required: undefined, validate: undefined, ref: elementRef });
const inputData = Object.assign({}, data, { ref: elementRef });
let radioOptionIndex;

@@ -373,6 +373,14 @@ const { ref, required, validate, ref: { name, type, value }, } = inputData;

function register(data) {
if (!data) {
console.error('Looks like ref is missing.');
return;
}
if (data instanceof HTMLElement) {
registerIntoAllFields(data);
}
return ref => registerIntoAllFields(ref, data);
return ref => {
if (ref) {
registerIntoAllFields(ref, data);
}
};
}

@@ -443,2 +451,3 @@ function watch(filedNames, defaultValue) {

});
// @ts-ignore
}

@@ -445,0 +454,0 @@ else if (!fields.current[name].eventAttached || !fields.current[name].eventAttached.includes('input')) {

@@ -335,3 +335,3 @@ 'use strict';

}
const inputData = Object.assign({}, data, { required: undefined, validate: undefined, ref: elementRef });
const inputData = Object.assign({}, data, { ref: elementRef });
let radioOptionIndex;

@@ -375,6 +375,14 @@ const { ref, required, validate, ref: { name, type, value }, } = inputData;

function register(data) {
if (!data) {
console.error('Looks like ref is missing.');
return;
}
if (data instanceof HTMLElement) {
registerIntoAllFields(data);
}
return ref => registerIntoAllFields(ref, data);
return ref => {
if (ref) {
registerIntoAllFields(ref, data);
}
};
}

@@ -445,2 +453,3 @@ function watch(filedNames, defaultValue) {

});
// @ts-ignore
}

@@ -447,0 +456,0 @@ else if (!fields.current[name].eventAttached || !fields.current[name].eventAttached.includes('input')) {

2

package.json
{
"name": "react-hook-form",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "module": "dist/index.es.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc