Every line of 'react clear input' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
41 clearInput() { 42 ReactDOM.findDOMNode(this.refs.input).value = ''; 43 }
54 clear() { 55 this.setState({ value: '' }); 56 57 // trigger onchange event on input 58 this.inputNode.value = ''; 59 this.onChange({ currentTarget: this.inputNode }); 60 this.inputNode.focus(); 61 }
603 clearValue() { 604 this.setState({ value: undefined }); 605 }
38 clearValue() { 39 this.props.onChange(''); 40 }
43 clearInput() { 44 this.setState({value: ''}); 45 this.onChangeText(''); 46 }
72 _onClear () { 73 const node = ReactDOM.findDOMNode(this) 74 node.value = '' 75 }
48 function handleClickClear() { 49 onChange(''); 50 $input.current.focus(); 51 }
660 value: function clearInputValue() { 661 this.props.onInputChange(''); 662 }
40 clear() { 41 var event = { 42 FAKE_EVENT: true, 43 target: this.input, 44 }; 45 this.input.value = ''; 46 this.onChange(event); 47 }
54 handleClear(e) { 55 e.stopPropagation(); 56 this.props.onClear && this.props.onClear(); 57 this.handleChange(''); 58 }