From 5c15e35149d157c54b4cb15f11a7dbb876157c3d Mon Sep 17 00:00:00 2001 From: vbojilova Date: Mon, 19 Aug 2024 08:48:11 -0700 Subject: [PATCH] fix: pass in handleSubmit reference instead of function call as prop #556 --- app/containers/IndicatorNew/index.js | 2 +- app/containers/PageNew/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/containers/IndicatorNew/index.js b/app/containers/IndicatorNew/index.js index 7f0e6769..d211b0b9 100644 --- a/app/containers/IndicatorNew/index.js +++ b/app/containers/IndicatorNew/index.js @@ -288,7 +288,7 @@ export class IndicatorNew extends React.PureComponent { // eslint-disable-line r saving={saveSending} bindHandleSubmit={this.bindHandleSubmit} handleSubmit={(formData) => this.props.handleSubmit(formData, recommendationsByFw)} - handleSubmitFail={this.props.handleSubmitFail()} + handleSubmitFail={this.props.handleSubmitFail} handleCancel={this.props.handleCancel} /*validators={{ '': { diff --git a/app/containers/PageNew/index.js b/app/containers/PageNew/index.js index c9421600..0e71e9e1 100644 --- a/app/containers/PageNew/index.js +++ b/app/containers/PageNew/index.js @@ -168,7 +168,7 @@ export class PageNew extends React.PureComponent { // eslint-disable-line react/ saving={saveSending} bindHandleSubmit={this.bindHandleSubmit} handleSubmit={(formData) => this.props.handleSubmit(formData)} - handleSubmitFail={() => this.props.handleSubmitFail()} + handleSubmitFail={this.props.handleSubmitFail} handleCancel={this.props.handleCancel} fields={{ header: {