Skip to content

Commit ef589f5

Browse files
committed
fix creating project in previousStepVisibility==none mode
1 parent cd1c7bf commit ef589f5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/projects/create/components/ProjectBasicDetailsForm.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,12 @@ class ProjectBasicDetailsForm extends Component {
205205
this.setState({ canSubmit: false })
206206
}
207207

208-
submit(model) {
208+
submit(/* model */) {
209+
// we cannot use `model` provided by Formzy because in the `previousStepVisibility==none` mode
210+
// some parts of the form are hidden, so Formzy thinks we don't have them
211+
// instead we use this.props.dirtyProject which contains the current project data
209212
this.setState({isSaving: true })
210-
const modelWithoutHiddenValues = removeValuesOfHiddenSteps(this.state.template, model)
213+
const modelWithoutHiddenValues = removeValuesOfHiddenSteps(this.state.template, this.props.dirtyProject)
211214
this.props.submitHandler(modelWithoutHiddenValues)
212215
}
213216

0 commit comments

Comments
 (0)