Skip to content

Commit

Permalink
Release 0.11.6
Browse files Browse the repository at this point in the history
  • Loading branch information
seeden committed Jan 31, 2016
1 parent ee1a767 commit 52e3e73
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-form-controlled",
"version": "0.11.5",
"version": "0.11.6",
"description": "React controlled form components. The main idea is to make forms as simple as possible.",
"author": {
"name": "Zlatko Fedor",
Expand Down
2 changes: 1 addition & 1 deletion src/Input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default class Input extends Element {
onChange(value, this);

if (typeof originalProps.onChange === 'function') {
originalProps.onChange(value);
originalProps.onChange(evn);
}
}

Expand Down
6 changes: 2 additions & 4 deletions src/Select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,12 @@ export default class Select extends Element {
}

const isMultiple = this.isMultiple();
const finallValue = isMultiple ? values : values[0];

const { originalProps, onChange } = this.props;

onChange(finallValue, this);
onChange(isMultiple ? values : values[0], this);

if (typeof originalProps.onChange === 'function') {
originalProps.onChange(finallValue);
originalProps.onChange(evn);
}
}

Expand Down
4 changes: 2 additions & 2 deletions tests/input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ describe('Input', () => {

}

function onChangeInput(value) {
value.should.equal('222');
function onChangeInput(evn) {
evn.target.value.should.equal('222');
onChangeInputCalled.should.equal(true);
done();
}
Expand Down

0 comments on commit 52e3e73

Please sign in to comment.