Skip to content

Commit

Permalink
agrega funcion que busca cuando apreta enter
Browse files Browse the repository at this point in the history
  • Loading branch information
xtian7489 committed Sep 18, 2023
1 parent 3dc49e4 commit c399dd3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ext/lib/site/home-catalogo/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,12 @@ class HomePropuestas extends Component {
)
}

handleInputTextKeyDown = (event) =>{
if(event.keyCode === 13){
this.handleInputSearch()
}
}

handleInputSearch = () => {
const {kwords} = this.state
this.fetchTopics();
Expand Down Expand Up @@ -384,6 +390,7 @@ class HomePropuestas extends Component {
<input
value={kwords}
onChange={(e) => this.setState({kwords: e.target.value})}
onKeyDown={this.handleInputTextKeyDown}
placeholder='Buscá un proyecto por nombre'
className='form-control search-proyecto-select'
/>
Expand Down

0 comments on commit c399dd3

Please sign in to comment.