With mouse click everything works, but I want it to work with keyboard
I want input to be unfocused/blurred when I press downKey while sitting in the input component.
This is my input component
import { Input } from 'semantic-ui-react';
<Input
focus={this.state.inputFocus}
ref='search'
placeholder='Search...' />
while going into the input, using keypress, this code helps to focus the input
this.refs.search.focus();
this.setState({ inputFocus: true });
but while going out from the input box, the blinking key indicator isn't removed and the box still appears to be focused,
Tried Code Doesn't Work
this.refs.search.blur(); // generates error
this.setState({ inputFocus: false }); //changes state var but ui isn't changed
Blur Error