File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " react-form-controlled" ,
3- "version" : " 0.11.3 " ,
3+ "version" : " 0.11.5 " ,
44 "description" : " React controlled form components. The main idea is to make forms as simple as possible." ,
55 "author" : {
66 "name" : " Zlatko Fedor" ,
Original file line number Diff line number Diff line change @@ -66,11 +66,11 @@ export default class Input extends Element {
6666
6767 const { originalProps, onChange } = this . props ;
6868
69+ onChange ( value , this ) ;
70+
6971 if ( typeof originalProps . onChange === 'function' ) {
7072 originalProps . onChange ( value ) ;
7173 }
72-
73- onChange ( value , this ) ;
7474 }
7575
7676 componentWillReceiveProps ( newProps ) {
Original file line number Diff line number Diff line change @@ -100,11 +100,11 @@ export default class Select extends Element {
100100
101101 const { originalProps, onChange } = this . props ;
102102
103+ onChange ( finallValue , this ) ;
104+
103105 if ( typeof originalProps . onChange === 'function' ) {
104106 originalProps . onChange ( finallValue ) ;
105107 }
106-
107- onChange ( finallValue , this ) ;
108108 }
109109
110110 renderPlaceholder ( ) {
Original file line number Diff line number Diff line change @@ -86,13 +86,14 @@ describe('Input', () => {
8686
8787 function onChange ( state ) {
8888 state . inputValue . should . equal ( '222' ) ;
89- onChangeInputCalled . should . equal ( true ) ;
90- done ( ) ;
89+ onChangeInputCalled = true ;
90+
9191 }
9292
9393 function onChangeInput ( value ) {
9494 value . should . equal ( '222' ) ;
95- onChangeInputCalled = true ;
95+ onChangeInputCalled . should . equal ( true ) ;
96+ done ( ) ;
9697 }
9798
9899 const node = renderJSX (
You can’t perform that action at this time.
0 commit comments