🐛 Résolution d'un bug sur le double clic pour valider

Résolution du bug = suppression d'un state React inutile
pull/151/head
mama 2018-01-30 17:59:39 +01:00
parent 3d206cb820
commit 48d9dcaa45
1 changed files with 1 additions and 6 deletions

View File

@ -133,13 +133,8 @@ let RadioLabel = props => (
@HoverDecorator
class RadioLabelContent extends Component {
state = {
active: null
}
click = value => () => {
this.props.setFormValue(value)
if (this.state.active !== value) this.setState({ active: value })
else this.props.submit('dblClick')
if (this.props.input.value == value) this.props.submit('dblClick')
}
render() {
let { value, label, input, hover, themeColours } = this.props,