fixing preventdefault function not found error
This commit is contained in:
parent
72c68d8a7c
commit
23a1fdca75
@ -124,17 +124,16 @@ class HomePage extends React.Component {
|
|||||||
<div className='pageheader'>
|
<div className='pageheader'>
|
||||||
<span className='pageheadertitle'>Home Page</span>
|
<span className='pageheadertitle'>Home Page</span>
|
||||||
<span className='pageheadersubtitle'>{this.state.tag} Videos - {this.state.selectionnr}</span>
|
<span className='pageheadersubtitle'>{this.state.tag} Videos - {this.state.selectionnr}</span>
|
||||||
<form className="form-inline searchform">
|
<form className="form-inline searchform" onSubmit={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
this.searchVideos(this.keyword);
|
||||||
|
}}>
|
||||||
<input data-testid='searchtextfield' className="form-control mr-sm-2"
|
<input data-testid='searchtextfield' className="form-control mr-sm-2"
|
||||||
type="text" placeholder="Search"
|
type="text" placeholder="Search"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
this.keyword = e.target.value
|
this.keyword = e.target.value
|
||||||
}}/>
|
}}/>
|
||||||
<button data-testid='searchbtnsubmit' className="btn btn-success" type="submit" onClick={(e) => {
|
<button data-testid='searchbtnsubmit' className="btn btn-success" type="submit">Search</button>
|
||||||
e.preventDefault();
|
|
||||||
this.searchVideos(this.keyword)
|
|
||||||
}}>Search
|
|
||||||
</button>
|
|
||||||
</form>
|
</form>
|
||||||
<hr/>
|
<hr/>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user