react-redux-form
react-redux-form copied to clipboard
rrf/clearIntents issue with checkbox group with many checkboxes
When creating a checkboxes with multiple select /SOME_NAME[]/ onChange fires rrf/clearIntents for every checkbox in the group. In my case one group is like 500 checkboxes /filtered/ and it's quite slow.
Can this be avoided somehow /reducing the number of the checkboxes it's not really an option/.
Hi @davidkpiano, can you please update on this issue? We are pretty backed into a corner right now because we are running into several issues implementing checkboxes where the checkbox values are dynamically generated and can include punctuation.
- Using the standard dot format
user.petsdoes not allow us to have keys that have period punctuation in the resulting object, and that's a requirement for us. We tried creating the model usinguser.pets[.catdog], in an attempt to make.catdogthe key in{'.catdog': true}, but the punctuation is parsed out, resulting in{'catdog': true}. We could not find any way to resolve this, so we swapped to using the second method for implementing multiple checkboxes. - Using
user.pets[]syntax with.catdogas the value did not parse out the period in the resulting array, but results in decreased performance because of all of therrf/clearIntentsspam. One per checkbox, to be exact, and our page has many checkboxes. Redux DevTools complain that too many actions are firing and taking up too much memory.
Please advise on how to proceed? Is there a way to stop the rrf/clearIntents spam?
Please note that ONE of 20 checkboxes clicked results in 20x rrf/clearIntents kicking off and impacting performance.
Thank you for your time. :)

Found a workaround. The following syntax generates the object with keys that have punctuation and avoids the performance issues with repeated clearIntents actions. Thanks for your time, maybe this will help someone else!
user.pets['.fido']