React-redux-form: Controls with debounce prop call change action after actions.reset when within componentWillUnmount

Created on 22 Sep 2017  路  7Comments  路  Source: davidkpiano/react-redux-form

The Problem

If a control has a debounce prop and the field has a value, calling action.reset on componentWillUnmount will first clear
the model and field and then call change again populating the field and model with previous value.

This is basically issue #884 but since i cannot reopen the issue i thought i would create a new since its still a bug in latest version.

The original OP's codepen can be used to view the bug https://codepen.io/lstuartfry/pen/Pjvwrq

Let me know if i should create a PR with a fix

Thanks :)

All 7 comments

@davidkpiano thanks for the quick fix but for some reason it doesnt seem that the fix has landed in 1.14.2

https://unpkg.com/[email protected]/lib/utils/debounce.js

the above debounce in the lib directory doesnt seem to have the fix and i pulled it down locally with the same issue

@davidkpiano can we maybe bump to 1.14.3 to ensure all new version have this fixed?

@davidchase I'll bump a new patch either today or tomorrow.

Ok thanks 馃憤馃徎

Just checking back in on this, has a new patch been released?

@lstuartfry yes it looks like the latest version has patch
https://unpkg.com/[email protected]/lib/utils/debounce.js L17

and check the codepen 馃憜 looks like it works 馃槃

@davidchase thanks for the update!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joshacheson picture joshacheson  路  3Comments

stevenmason picture stevenmason  路  4Comments

dstudzinski picture dstudzinski  路  3Comments

mikkelwf picture mikkelwf  路  3Comments

ndevvy picture ndevvy  路  3Comments