Le bouton valider dans les questions à choix peut être désactivé

pull/151/head
mama 2018-01-18 19:05:41 +01:00
parent 562e26639d
commit e7f2f658ce
1 changed files with 8 additions and 4 deletions

View File

@ -27,19 +27,23 @@ import SendButton from './SendButton'
export default class Question extends Component {
render() {
let {
stepProps: { choices },
stepProps: { choices, submit },
themeColours,
stepProps: { submit }
meta: { pristine }
} = this.props
let choiceElements = is(Array)(choices)
? this.renderBinaryQuestion()
: this.renderChildren(choices)
return (
<>
{choiceElements}
<SendButton
{...{ disabled: false, themeColours, error: false, submit }}
{...{
disabled: pristine,
themeColours,
error: false,
submit
}}
/>
</>
)