Skip to content
This repository has been archived by the owner on Aug 23, 2022. It is now read-only.

Controls with debounce prop call change action after actions.reset when within componentWillUnmount #951

Closed
davidchase opened this issue Sep 22, 2017 · 7 comments

Comments

@davidchase
Copy link

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 :)

@davidchase
Copy link
Author

@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/react-redux-form@1.14.2/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

@davidchase
Copy link
Author

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

@davidkpiano
Copy link
Owner

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

@davidchase
Copy link
Author

Ok thanks 👍🏻

@lstuartfry
Copy link

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

@davidchase
Copy link
Author

davidchase commented Oct 13, 2017

@lstuartfry yes it looks like the latest version has patch
https://unpkg.com/react-redux-form@1.14.6/lib/utils/debounce.js L17

and check the codepen 👆 looks like it works 😄

@lstuartfry
Copy link

@davidchase thanks for the update!

peterox added a commit to peterox/react-redux-form that referenced this issue Oct 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants