File tree 4 files changed +9
-8
lines changed
4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-form-controlled" ,
3
- "version" : " 0.11.3 " ,
3
+ "version" : " 0.11.5 " ,
4
4
"description" : " React controlled form components. The main idea is to make forms as simple as possible." ,
5
5
"author" : {
6
6
"name" : " Zlatko Fedor" ,
Original file line number Diff line number Diff line change @@ -66,11 +66,11 @@ export default class Input extends Element {
66
66
67
67
const { originalProps, onChange } = this . props ;
68
68
69
+ onChange ( value , this ) ;
70
+
69
71
if ( typeof originalProps . onChange === 'function' ) {
70
72
originalProps . onChange ( value ) ;
71
73
}
72
-
73
- onChange ( value , this ) ;
74
74
}
75
75
76
76
componentWillReceiveProps ( newProps ) {
Original file line number Diff line number Diff line change @@ -100,11 +100,11 @@ export default class Select extends Element {
100
100
101
101
const { originalProps, onChange } = this . props ;
102
102
103
+ onChange ( finallValue , this ) ;
104
+
103
105
if ( typeof originalProps . onChange === 'function' ) {
104
106
originalProps . onChange ( finallValue ) ;
105
107
}
106
-
107
- onChange ( finallValue , this ) ;
108
108
}
109
109
110
110
renderPlaceholder ( ) {
Original file line number Diff line number Diff line change @@ -86,13 +86,14 @@ describe('Input', () => {
86
86
87
87
function onChange ( state ) {
88
88
state . inputValue . should . equal ( '222' ) ;
89
- onChangeInputCalled . should . equal ( true ) ;
90
- done ( ) ;
89
+ onChangeInputCalled = true ;
90
+
91
91
}
92
92
93
93
function onChangeInput ( value ) {
94
94
value . should . equal ( '222' ) ;
95
- onChangeInputCalled = true ;
95
+ onChangeInputCalled . should . equal ( true ) ;
96
+ done ( ) ;
96
97
}
97
98
98
99
const node = renderJSX (
You can’t perform that action at this time.
0 commit comments