I need help in making the component search fire up only when a submit button is clicked or hit enter key. not as the user types.
I have set up my state and used onValueChange method to get the value entered made the button
state={
searchText: ""
}
......
...
onValueChange= {(e) => this.setState({searchText:e.target.value})}
<button type="button >
Search
</button>
I want my button to get that value and make the query run when hit submit or press enter. thanks for help