Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ee1a767

Browse files
committedJan 31, 2016
Release 0.11.5
1 parent 92c5b0a commit ee1a767

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed
 

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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",

‎src/Input.jsx

+2-2
Original file line numberDiff line numberDiff 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) {

‎src/Select.jsx

+2-2
Original file line numberDiff line numberDiff 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() {

‎tests/input.jsx

+4-3
Original file line numberDiff line numberDiff 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(

0 commit comments

Comments
 (0)
Please sign in to comment.