Skip to content
Snippets Groups Projects
Commit 9cb0ef90 authored by Alexandros Georgantas's avatar Alexandros Georgantas
Browse files

Merge branch '140-control-panel-not-loading' into 'master'

fixing 409 eror with a workaround throttling instead of debounce

Closes #140

See merge request xpub!122
parents 47b8888e bab13f00
No related branches found
No related tags found
No related merge requests found
import { pick, debounce } from 'lodash' import { pick, throttle } from 'lodash'
import { compose, withProps, withState, withHandlers } from 'recompose' import { compose, withProps, withState, withHandlers } from 'recompose'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { reduxForm, SubmissionError } from 'redux-form' import { reduxForm, SubmissionError } from 'redux-form'
...@@ -92,7 +92,7 @@ export default compose( ...@@ -92,7 +92,7 @@ export default compose(
reduxForm({ reduxForm({
// enableReinitialize: true, // enableReinitialize: true,
form: 'submit', form: 'submit',
onChange: debounce(onChange, 1000, { maxWait: 5000 }), onChange: throttle(onChange, 3000, { trailing: false }),
onSubmit, onSubmit,
}), }),
withState('confirming', 'setConfirming', false), withState('confirming', 'setConfirming', false),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment