Specify default props

This commit is contained in:
Shin'ya Ueoka 2019-04-30 09:15:58 +09:00
parent 808344eecf
commit fce2434dcd
4 changed files with 8 additions and 19 deletions

View file

@ -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;