informed icon indicating copy to clipboard operation
informed copied to clipboard

v3.9 & Greater - `onValueChange` no longer fired on `formApi.reset()`

Open drainpip opened this issue 6 years ago • 6 comments

Hey there - previous to v3.9: formApi.reset would fire off the onValueChange event.

We have a relatively expensive operation that relies on a complex form value being filtered, and we were using onValueChange to get around having to run those filters for onChange which is quite noisy.

Is this something that can be reverted?

Reproducible case:

https://codesandbox.io/s/goofy-volhard-g5qpz?file=/src/App.js

drainpip avatar Aug 20 '20 19:08 drainpip

This is also an issue in 3.10.

drainpip avatar Oct 15 '20 21:10 drainpip

Ok thanks for the reproduction. I will need to look into this.

joepuzzo avatar Oct 26 '20 18:10 joepuzzo

@joepuzzo - is this one of those things that's a major issue to fix? We actually need some of the fixes in later versions at this point, but we're still blocked on this.

If it's a major issue we'll figure something out, but just checking in on it.

drainpip avatar Jan 26 '21 17:01 drainpip

Just double checked on 3.30: https://codesandbox.io/s/elegant-sun-hsjzj

We'll find another path forward for this I believe, but let me know if you find it!

drainpip avatar Mar 25 '21 21:03 drainpip

I dont think im going to fix this as I dont want this firing n times where n is equal to the number of fields that get reset. Too many calls

joepuzzo avatar Jun 23 '21 01:06 joepuzzo

It's no problem, thanks for checking in.

drainpip avatar Jun 23 '21 21:06 drainpip