Skip to content

Commit 9f0bd27

Browse files
committed
Bug fix
1 parent 6fe39ab commit 9f0bd27

File tree

1 file changed

+10
-9
lines changed
  • src/containers/SequenceSearch/components/SearchForm

1 file changed

+10
-9
lines changed

src/containers/SequenceSearch/components/SearchForm/index.jsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@ class SearchForm extends React.Component {
3838
</div>)
3939
}
4040

41+
onSubmit(event) {
42+
event.preventDefault();
43+
44+
const state = store.getState();
45+
if (state.sequence) {
46+
store.dispatch(actions.onSubmit(state.sequence, this.props.databases));
47+
state.sequence = "";
48+
}
49+
}
50+
4151
render() {
4252
return (
4353
<div className="row">
@@ -78,15 +88,6 @@ class SearchForm extends React.Component {
7888
</div>
7989
)
8090
}
81-
82-
onSubmit(event) {
83-
event.preventDefault();
84-
85-
const state = store.getState();
86-
if (state.sequence) {
87-
store.dispatch(actions.onSubmit(state.sequence, this.props.databases));
88-
}
89-
}
9091
}
9192

9293
const mapStateToProps = (state) => ({

0 commit comments

Comments
 (0)