0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

add onBlur to lang input to reset to valid

This commit is contained in:
Gazook89
2023-03-08 14:24:15 -06:00
parent 7bef807c41
commit 461487534d

View File

@@ -75,6 +75,13 @@ const Combobox = createClass({
onChange={(e)=>this.handleInput(e)}
value={this.state.value || ''}
placeholder={this.props.placeholder}
onBlur={(e)=>{
if(!e.target.checkValidity()){
this.setState({
value : this.props.default
}, ()=>this.props.onEntry(e));
}
}}
/>
</div>
);