Skip to content

Commit 52e3e73

Browse files
committed
Release 0.11.6
1 parent ee1a767 commit 52e3e73

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-form-controlled",
3-
"version": "0.11.5",
3+
"version": "0.11.6",
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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default class Input extends Element {
6969
onChange(value, this);
7070

7171
if (typeof originalProps.onChange === 'function') {
72-
originalProps.onChange(value);
72+
originalProps.onChange(evn);
7373
}
7474
}
7575

src/Select.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,12 @@ export default class Select extends Element {
9696
}
9797

9898
const isMultiple = this.isMultiple();
99-
const finallValue = isMultiple ? values : values[0];
100-
10199
const { originalProps, onChange } = this.props;
102100

103-
onChange(finallValue, this);
101+
onChange(isMultiple ? values : values[0], this);
104102

105103
if (typeof originalProps.onChange === 'function') {
106-
originalProps.onChange(finallValue);
104+
originalProps.onChange(evn);
107105
}
108106
}
109107

tests/input.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ describe('Input', () => {
9090

9191
}
9292

93-
function onChangeInput(value) {
94-
value.should.equal('222');
93+
function onChangeInput(evn) {
94+
evn.target.value.should.equal('222');
9595
onChangeInputCalled.should.equal(true);
9696
done();
9797
}

0 commit comments

Comments
 (0)