From 039d65d818b8f820b20fc8386c811ff47de29e8d Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Fri, 17 May 2019 16:25:27 +0200 Subject: [PATCH] =?UTF-8?q?:bug:=20r=C3=A9pare=20les=20suggestions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/TargetSelection.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/components/TargetSelection.js b/source/components/TargetSelection.js index eaee75f1a..b4c7ec863 100644 --- a/source/components/TargetSelection.js +++ b/source/components/TargetSelection.js @@ -7,7 +7,7 @@ import withLanguage from 'Components/utils/withLanguage' import withSitePaths from 'Components/utils/withSitePaths' import { encodeRuleName } from 'Engine/rules' import { compose, isEmpty, isNil, propEq } from 'ramda' -import React, { Component, PureComponent } from 'react' +import React, { Component, PureComponent, useState } from 'react' import { withTranslation } from 'react-i18next' import { connect } from 'react-redux' import { Link } from 'react-router-dom' @@ -173,6 +173,7 @@ const Target = ({ }) => { const isSmallTarget = !target.question || !target.formule || isEmpty(target.formule) + const [suggestionValue, setSuggestionValue] = useState(null) return (
  • )} + onFirstClick={value => { setFormValue(target.dottedName, '' + value) - } + setSuggestionValue(value) + }} rulePeriod={target.pĂ©riode} colouredBackground={true} />