Specify default props
This commit is contained in:
parent
808344eecf
commit
fce2434dcd
4 changed files with 8 additions and 19 deletions
|
@ -44,10 +44,6 @@ class SearchForm extends React.Component {
|
|||
}
|
||||
|
||||
bindValue(e) {
|
||||
if (!this.props.onChange) {
|
||||
return;
|
||||
}
|
||||
|
||||
let value = this.props.value;
|
||||
let name = e.target.name;
|
||||
let index = e.target.getAttribute('data-index');
|
||||
|
@ -83,6 +79,7 @@ SearchForm.propTypes = {
|
|||
|
||||
SearchForm.defaultProps = {
|
||||
value: { default: '', engines: []},
|
||||
onChange: () => {},
|
||||
};
|
||||
|
||||
export default SearchForm;
|
||||
|
|
Reference in a new issue