Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

disable enter on input field react

<MyInputWidget
  label="Find"
  placeholder="Search..."
  onChange={this.search}
  onKeyPress={(e) => { e.key === 'Enter' && e.preventDefault(); }}
  value={this.state.searchText} />
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #disable #enter #input #field #react
ADD COMMENT
Topic
Name
7+3 =