Skip to content

Commit

Permalink
fix(Search): fix onChange argc. Close #394
Browse files Browse the repository at this point in the history
  • Loading branch information
bindoon committed Jul 4, 2019
1 parent 8796abe commit aa9de65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion docs/affix/demo/absolute-position.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ ReactDOM.render(<Demo />, mountNode);
.custom-affix-container {
height: 150px;
overflow-y: scroll;
width: 50px;
background: url(https://img.alicdn.com/tfs/TB1AbJXSpXXXXXJXpXXXXXXXXXX-32-32.jpg) repeat 50% 50%;
}

Expand Down
4 changes: 2 additions & 2 deletions src/search/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ class Search extends React.Component {
this.setState(state);
}

onChange = value => {
onChange = (value, ...argv) => {
if (!('value' in this.props)) {
this.setState({ value });
}

this.props.onChange(value);
this.props.onChange(value, ...argv);
};

onSearch = () => {
Expand Down

0 comments on commit aa9de65

Please sign in to comment.