Skip to content

Commit c225ebf

Browse files
committed
Disable buttons whenever the text field is empty
1 parent 9be3958 commit c225ebf

File tree

1 file changed

+2
-2
lines changed
  • src/containers/SequenceSearch/components/SearchForm

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ class SearchForm extends React.Component {
8585
</div>
8686
<div className="small-3 columns">
8787
<div className="row">
88-
<input id="submit-button" style={{background: searchButtonColor}} name="submit" type="submit" value="Search" className="button" />
88+
<input id="submit-button" style={{background: searchButtonColor}} name="submit" type="submit" value="Search" className="button" disabled={!this.props.sequence ? "disabled" : ""}/>
8989
</div>
9090
<div className="row">
91-
<input id="clear-button" style={{background: clearButtonColor}} name="clear" type="submit" value="Clear" className="button" onClick={ this.props.onClearSequence } />
91+
<input id="clear-button" style={{background: clearButtonColor}} name="clear" type="submit" value="Clear" className="button" onClick={ this.props.onClearSequence } disabled={!this.props.sequence ? "disabled" : ""}/>
9292
</div>
9393
{
9494
database.indexOf("RFAM") === -1 && <div>

0 commit comments

Comments
 (0)