✨ Les suggestions ne s'inserent plus au survol
Je ne suis pas convaincu de l'interet UX (voir inquiet de la confusion que Ãa apporte), et ca complexifie le codepull/209/head
parent
1b5857a825
commit
1056a0462e
|
@ -13,7 +13,7 @@ export default class Input extends Component {
|
|||
i18n: PropTypes.object.isRequired
|
||||
}
|
||||
state = {
|
||||
lastValue: ''
|
||||
suggestion: null
|
||||
}
|
||||
render() {
|
||||
let {
|
||||
|
@ -81,20 +81,11 @@ export default class Input extends Component {
|
|||
<li
|
||||
key={value}
|
||||
onClick={() => {
|
||||
this.setState({ lastValue: null })
|
||||
setFormValue('' + value)
|
||||
if (this.state.suggestion !== value)
|
||||
this.setState({ suggestion: value })
|
||||
else this.props.submit('suggestion')
|
||||
}}
|
||||
onMouseOver={() => {
|
||||
this.setState({ lastValue: this.props.input.value })
|
||||
setFormValue('' + value)
|
||||
}}
|
||||
onMouseOut={() =>
|
||||
this.state.lastValue != null &&
|
||||
setFormValue('' + this.state.lastValue)
|
||||
}
|
||||
style={{ color: themeColours.textColourOnWhite }}>
|
||||
<span title={i18n.t('cliquez pour insérer cette suggestion')}>
|
||||
{text}
|
||||
|
|
Loading…
Reference in New Issue