Comparing version 2.5.0 to 2.5.1
@@ -42,2 +42,8 @@ import React from 'react'; | ||
state: State<Value>; | ||
props: { | ||
ref: (node: HTMLInputElement) => void; | ||
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; | ||
onFocus: (event: FocusEvent | React.FocusEvent<HTMLInputElement>) => void; | ||
onBlur: (event: FocusEvent | React.FocusEvent<HTMLInputElement>) => void; | ||
}; | ||
private _events; | ||
@@ -48,6 +54,2 @@ private _initialValue; | ||
constructor(opts?: FieldOpts<Value>, form?: Form<any>); | ||
ref: (node: HTMLInputElement) => void; | ||
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; | ||
onFocus: (event: React.FocusEvent<HTMLInputElement>) => void; | ||
onBlur: (event: React.FocusEvent<HTMLInputElement>) => void; | ||
setState(values: Partial<State<Value>>): void; | ||
@@ -54,0 +56,0 @@ setRef(node: HTMLInputElement): void; |
@@ -302,15 +302,2 @@ import equal from 'fast-deep-equal'; | ||
if (opts === void 0) { opts = {}; } | ||
// React methods | ||
this.ref = function (node) { | ||
_this.node = node; | ||
}; | ||
this.onChange = function (event) { | ||
_this.set(event.currentTarget.value); | ||
}; | ||
this.onFocus = function (event) { | ||
_this.handleFocus(event); | ||
}; | ||
this.onBlur = function (event) { | ||
_this.handleBlur(event); | ||
}; | ||
this.handleFocus = function (event) { | ||
@@ -391,2 +378,8 @@ _this._events.dispatch(eventNames.focus, event); | ||
}; | ||
this.props = { | ||
ref: function (node) { return _this.node = node; }, | ||
onChange: function (event) { return _this.set(event.currentTarget.value); }, | ||
onFocus: this.handleFocus, | ||
onBlur: this.handleBlur, | ||
}; | ||
this._events = new EventAggregator(); | ||
@@ -393,0 +386,0 @@ this._initialValue = this.state.value; |
@@ -42,2 +42,8 @@ import React from 'react'; | ||
state: State<Value>; | ||
props: { | ||
ref: (node: HTMLInputElement) => void; | ||
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; | ||
onFocus: (event: FocusEvent | React.FocusEvent<HTMLInputElement>) => void; | ||
onBlur: (event: FocusEvent | React.FocusEvent<HTMLInputElement>) => void; | ||
}; | ||
private _events; | ||
@@ -48,6 +54,2 @@ private _initialValue; | ||
constructor(opts?: FieldOpts<Value>, form?: Form<any>); | ||
ref: (node: HTMLInputElement) => void; | ||
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; | ||
onFocus: (event: React.FocusEvent<HTMLInputElement>) => void; | ||
onBlur: (event: React.FocusEvent<HTMLInputElement>) => void; | ||
setState(values: Partial<State<Value>>): void; | ||
@@ -54,0 +56,0 @@ setRef(node: HTMLInputElement): void; |
@@ -308,15 +308,2 @@ 'use strict'; | ||
if (opts === void 0) { opts = {}; } | ||
// React methods | ||
this.ref = function (node) { | ||
_this.node = node; | ||
}; | ||
this.onChange = function (event) { | ||
_this.set(event.currentTarget.value); | ||
}; | ||
this.onFocus = function (event) { | ||
_this.handleFocus(event); | ||
}; | ||
this.onBlur = function (event) { | ||
_this.handleBlur(event); | ||
}; | ||
this.handleFocus = function (event) { | ||
@@ -397,2 +384,8 @@ _this._events.dispatch(eventNames.focus, event); | ||
}; | ||
this.props = { | ||
ref: function (node) { return _this.node = node; }, | ||
onChange: function (event) { return _this.set(event.currentTarget.value); }, | ||
onFocus: this.handleFocus, | ||
onBlur: this.handleBlur, | ||
}; | ||
this._events = new EventAggregator(); | ||
@@ -399,0 +392,0 @@ this._initialValue = this.state.value; |
{ | ||
"name": "formular", | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "Pavel Ivanov", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
115079
2245