Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Warning: Failed prop type: You provided a `value` prop to a form field without an `onChange` handler.

state = {
   keyword: 'test' 
} 

inputChangedHandler = (event) => {
    const updatedKeyword = event.target.value;
    // May be call for search result
}

render() {
  return (
      <input 
         type="text" 
         placeholder="Search..."
         value={this.state.keyword} 
         onChange={(event)=>this.inputChangedHandler(event)} />
   );
} 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Failed #prop #You #prop #form #field
ADD COMMENT
Topic
Name
5+1 =