Comparing version 2.1.5 to 2.1.6
@@ -42,2 +42,3 @@ import { CancelablePromise } from './util/index'; | ||
unset(): void; | ||
setError(error: any): void; | ||
validate: () => CancelablePromise; | ||
@@ -44,0 +45,0 @@ on(eventName: string, handler: Function): void; |
@@ -168,2 +168,13 @@ var __assign = (this && this.__assign) || function () { | ||
}; | ||
Field.prototype.setError = function (error) { | ||
this.setState({ | ||
error: error, | ||
isChanged: true, | ||
isValid: false, | ||
isValidating: false, | ||
isValidated: true, | ||
}); | ||
this._events.dispatch('set', this.state.value); | ||
this._events.dispatch('change', this.state.value); // @deprecated | ||
}; | ||
Field.prototype.on = function (eventName, handler) { | ||
@@ -170,0 +181,0 @@ this._events.subscribe(eventName, handler); |
{ | ||
"name": "formular", | ||
"version": "2.1.5", | ||
"version": "2.1.6", | ||
"author": "Pavel Ivanov", | ||
@@ -5,0 +5,0 @@ "description": "Build forms in React. Easy-Peasy!", |
Sorry, the diff of this file is not supported yet
78681
1228