From bab13f000808e4479f36eac00b3354c707c0ea8b Mon Sep 17 00:00:00 2001 From: Giannis Kopanas <jkopanas@gmail.com> Date: Thu, 15 Feb 2018 14:18:41 +0200 Subject: [PATCH] fixing 409 eror with a workaround throttling instead of debounce --- packages/component-submit/src/components/SubmitPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/component-submit/src/components/SubmitPage.js b/packages/component-submit/src/components/SubmitPage.js index e4083b423..9b75840b6 100644 --- a/packages/component-submit/src/components/SubmitPage.js +++ b/packages/component-submit/src/components/SubmitPage.js @@ -1,4 +1,4 @@ -import { pick, debounce } from 'lodash' +import { pick, throttle } from 'lodash' import { compose, withProps, withState, withHandlers } from 'recompose' import { connect } from 'react-redux' import { reduxForm, SubmissionError } from 'redux-form' @@ -92,7 +92,7 @@ export default compose( reduxForm({ // enableReinitialize: true, form: 'submit', - onChange: debounce(onChange, 1000, { maxWait: 5000 }), + onChange: throttle(onChange, 3000, { trailing: false }), onSubmit, }), withState('confirming', 'setConfirming', false), -- GitLab