Skip to content

Commit

Permalink
Release 0.11.5
Browse files Browse the repository at this point in the history
  • Loading branch information
seeden committed Jan 31, 2016
1 parent 92c5b0a commit ee1a767
Show file tree
Hide file tree
Showing 4 changed files with 9 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.3",
"version": "0.11.5",
"description": "React controlled form components. The main idea is to make forms as simple as possible.",
"author": {
"name": "Zlatko Fedor",
Expand Down
4 changes: 2 additions & 2 deletions src/Input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ export default class Input extends Element {

const { originalProps, onChange } = this.props;

onChange(value, this);

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

onChange(value, this);
}

componentWillReceiveProps(newProps) {
Expand Down
4 changes: 2 additions & 2 deletions src/Select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ export default class Select extends Element {

const { originalProps, onChange } = this.props;

onChange(finallValue, this);

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

onChange(finallValue, this);
}

renderPlaceholder() {
Expand Down
7 changes: 4 additions & 3 deletions tests/input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,14 @@ describe('Input', () => {

function onChange(state) {
state.inputValue.should.equal('222');
onChangeInputCalled.should.equal(true);
done();
onChangeInputCalled = true;

}

function onChangeInput(value) {
value.should.equal('222');
onChangeInputCalled = true;
onChangeInputCalled.should.equal(true);
done();
}

const node = renderJSX(
Expand Down

0 comments on commit ee1a767

Please sign in to comment.