New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@uform/core

Package Overview
Dependencies
Maintainers
2
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uform/core - npm Package Compare versions

Comparing version 0.1.0-beta.6 to 0.1.0-beta.7

44

lib/form.js

@@ -154,3 +154,3 @@ "use strict";

this.updateFieldsValue();
this.updateFieldsValue(false);
};

@@ -531,24 +531,36 @@

_proto.updateFieldsValue = function updateFieldsValue() {
_proto.updateFieldsValue = function updateFieldsValue(validate) {
var _this11 = this;
if (this.state.dirty && this.initialized) {
this.internalValidate(this.state.values, true).then(function () {
_this11.formNotify();
if (validate === void 0) {
validate = true;
}
(0, _utils.each)(_this11.fields, function (field, name) {
var newValue = _this11.getValue(name);
var update = function update() {
(0, _utils.each)(_this11.fields, function (field, name) {
var newValue = _this11.getValue(name);
field.updateState(function (state) {
state.value = newValue;
field.updateState(function (state) {
state.value = newValue;
});
if (field.dirty) {
(0, _utils.raf)(function () {
if (_this11.destructed) return;
field.notify();
});
}
});
};
if (field.dirty) {
(0, _utils.raf)(function () {
if (_this11.destructed) return;
field.notify();
});
}
if (this.state.dirty && this.initialized) {
if (validate) {
this.internalValidate(this.state.values, true).then(function () {
_this11.formNotify();
update();
});
});
} else {
update();
}
}

@@ -555,0 +567,0 @@ };

{
"name": "@uform/core",
"version": "0.1.0-beta.6",
"version": "0.1.0-beta.7",
"license": "MIT",

@@ -28,3 +28,3 @@ "main": "lib",

},
"gitHead": "0d0cfef39f9ab55f8df71d3f409cbfcad1dec652"
"gitHead": "1314b59984b62cc23831e4c6b17610c16cfe4525"
}

@@ -72,3 +72,3 @@ import {

}
this.updateFieldsValue()
this.updateFieldsValue(false)
}

@@ -451,20 +451,27 @@

updateFieldsValue() {
if (this.state.dirty && this.initialized) {
this.internalValidate(this.state.values, true).then(() => {
this.formNotify()
each(this.fields, (field, name) => {
let newValue = this.getValue(name)
field.updateState(state => {
state.value = newValue
updateFieldsValue(validate = true) {
const update = () => {
each(this.fields, (field, name) => {
let newValue = this.getValue(name)
field.updateState(state => {
state.value = newValue
})
if (field.dirty) {
raf(() => {
if (this.destructed) return
field.notify()
})
if (field.dirty) {
raf(() => {
if (this.destructed) return
field.notify()
})
}
})
}
})
}
if (this.state.dirty && this.initialized) {
if (validate) {
this.internalValidate(this.state.values, true).then(() => {
this.formNotify()
update()
})
} else {
update()
}
}
}

@@ -471,0 +478,0 @@

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