Le choix 'Aucun' est remonté en premier pour les questions multiples

pull/117/head
mama 2017-10-24 20:00:01 +02:00
parent dba0bc5838
commit 35387dfca4
1 changed files with 8 additions and 8 deletions

View File

@ -73,21 +73,21 @@ export default class Question extends Component {
radioDottedName.split(name + ' . ')[1]
return (<ul>
{choices.canGiveUp &&
<li key='aucun' className="variantLeaf aucun">
<RadioLabel {...{value: 'non', label: 'Aucun', input, submit, themeColours}}/>
</li>
}
{ choices.children && choices.children.map( ({name, titre, dottedName, children}) =>
children ?
<li key={name} className="variant">
<div>{titre || name}</div>
{this.renderChildren({children})}
</li>
: <li key={name} className="variantLeaf">
<RadioLabel {...{value: relativeDottedName(dottedName), label: titre || name, dottedName, input, submit, themeColours}}/>
</li>
: <li key={name} className="variantLeaf">
<RadioLabel {...{value: relativeDottedName(dottedName), label: titre || name, dottedName, input, submit, themeColours}}/>
</li>
)}
{choices.canGiveUp &&
<li key='aucun' className="variantLeaf aucun">
<RadioLabel {...{value: 'non', label: 'Aucun', input, submit, themeColours}}/>
</li>
}
</ul>)
}
}