Pas de suggestions pendant une inversion
L'idéal serait de calculer les valeurs inversées !pull/138/head
parent
6f75b94bba
commit
63eab021c1
|
@ -112,6 +112,7 @@ export default class extends Component {
|
|||
step={step}
|
||||
situationGate={situationGate}
|
||||
fieldName={fieldName}
|
||||
inverted={step.name !== fieldName}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -38,7 +38,8 @@ export var FormDecorator = formType => RenderField =>
|
|||
/* Une étape déjà répondue est marquée 'folded'. Dans ce dernier cas, un résumé
|
||||
de la réponse est affiché */
|
||||
unfolded,
|
||||
fieldName
|
||||
fieldName,
|
||||
inverted
|
||||
} = this.props,
|
||||
{
|
||||
possibleChoice, // should be found in the question set theoritically, but it is used for a single choice question -> the question itself is dynamic and cannot be input as code,
|
||||
|
@ -55,6 +56,7 @@ export var FormDecorator = formType => RenderField =>
|
|||
*/
|
||||
let stepProps = {
|
||||
...this.props.step,
|
||||
inverted,
|
||||
//TODO hack, enables redux-form/CHANGE to update the form state before the traverse functions are run
|
||||
submit: () => setTimeout(() => stepAction('fold', fieldName), 1),
|
||||
setFormValue: (value, name=fieldName) => setFormValue(name, value)
|
||||
|
|
|
@ -107,8 +107,11 @@ export default class Input extends Component {
|
|||
)
|
||||
}
|
||||
renderSuggestions(themeColours) {
|
||||
let { setFormValue, submit, suggestions, input } = this.props.stepProps
|
||||
if (!suggestions) return null
|
||||
let { setFormValue, submit, suggestions, input, name, inverted } = this.props.stepProps
|
||||
|
||||
|
||||
|
||||
if (!suggestions || inverted) return null
|
||||
return (
|
||||
<div className="inputSuggestions">
|
||||
suggestions:
|
||||
|
|
Loading…
Reference in New Issue