🐛 Réparation du bouton "tout effacer"
parent
3b0d6829ad
commit
4b5c6e3b13
|
@ -30,8 +30,8 @@ import ResultsGrid from 'Components/ResultsGrid'
|
|||
inputInversions: formValueSelector('conversation')(state, 'inversions')
|
||||
}),
|
||||
dispatch => ({
|
||||
startConversation: targetNames =>
|
||||
dispatch({ type: START_CONVERSATION, targetNames }),
|
||||
startConversation: (targetNames, fromScratch=false) =>
|
||||
dispatch({ type: START_CONVERSATION, targetNames, fromScratch }),
|
||||
resetForm: () => dispatch(reset('conversation')),
|
||||
resetFormField: name => dispatch(change('conversation', name, ''))
|
||||
})
|
||||
|
@ -75,8 +75,8 @@ export default class extends Component {
|
|||
} = this.props,
|
||||
reinitalise = () => {
|
||||
ReactPiwik.push(['trackEvent', 'restart', ''])
|
||||
this.props.resetForm(this.name)
|
||||
this.props.startConversation(this.targets)
|
||||
this.props.resetForm()
|
||||
this.props.startConversation(this.targetNames, true)
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
|
@ -88,11 +88,12 @@ export let reduceSteps = (tracker, flatRules, answerSource) => (
|
|||
return {
|
||||
...newState,
|
||||
// when objectives change, reject theme from answered questions
|
||||
foldedSteps: R.reject(name => targetNames.includes(nameLeaf(name)))(
|
||||
foldedSteps: action.fromScratch ? [] : R.reject(name => targetNames.includes(nameLeaf(name)))(
|
||||
state.foldedSteps
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (action.type == STEP_ACTION && action.name == 'fold') {
|
||||
tracker.push([
|
||||
'trackEvent',
|
||||
|
|
Loading…
Reference in New Issue