From 461487534d66af89de3bfc367e85389095b513a8 Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Wed, 8 Mar 2023 14:24:15 -0600 Subject: [PATCH] add onBlur to lang input to reset to valid --- client/components/combobox.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/components/combobox.jsx b/client/components/combobox.jsx index 66e7053da..8963bcf68 100644 --- a/client/components/combobox.jsx +++ b/client/components/combobox.jsx @@ -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)); + } + }} /> );