diff --git a/source/actions.js b/source/actions.js
index 6516f6bd2..9e187b9ed 100644
--- a/source/actions.js
+++ b/source/actions.js
@@ -2,8 +2,8 @@
// The state keeps track of which of them have been submitted
// The user can also come back to one of his answers and edit it
export const STEP_ACTION = 'STEP_ACTION'
-export function stepAction(name, step) {
- return { type: STEP_ACTION, name, step }
+export function stepAction(name, step, source) {
+ return { type: STEP_ACTION, name, step, source }
}
export const START_CONVERSATION = 'START_CONVERSATION'
diff --git a/source/components/conversation/FormDecorator.js b/source/components/conversation/FormDecorator.js
index 1db92d615..69dac8ee2 100644
--- a/source/components/conversation/FormDecorator.js
+++ b/source/components/conversation/FormDecorator.js
@@ -25,7 +25,7 @@ export var FormDecorator = formType => RenderField =>
formValueSelector('conversation')(state, 'inversions.' + dottedName)
}),
dispatch => ({
- stepAction: (name, step) => dispatch(stepAction(name, step)),
+ stepAction: (name, step, source) => dispatch(stepAction(name, step, source)),
setFormValue: (field, value) =>
dispatch(change('conversation', field, value))
})
@@ -76,7 +76,7 @@ export var FormDecorator = formType => RenderField =>
des balises html, dans notre cas.
*/
//TODO hack, enables redux-form/CHANGE to update the form state before the traverse functions are run
- let submit = () => setTimeout(() => stepAction('fold', fieldName), 1),
+ let submit = (cause) => setTimeout(() => stepAction('fold', fieldName, cause), 1),
stepProps = {
...this.props.step,
inverted,
@@ -121,7 +121,7 @@ export var FormDecorator = formType => RenderField =>
{
setFormValue(fieldName, '' + defaultValue)
- submit()
+ submit('ignore')
}}
/>
)}
@@ -159,7 +159,7 @@ export var FormDecorator = formType => RenderField =>