-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Since diffing right now is just at the handler level, and always replaces everything beneath it, people could get a pretty jarring surprise when working with a form. For example, they add an onBlur to an input in the form for validation, and other fields already filled in are blanked when the DOM updates with an error.
If they changed the position of the form in the DOM by some means, I also think it would be blanked.
Take an initial stab at it working for a very simple case:
- A form with an email and password
- The password has an onBlur validation that fails and displays an error message beneath the password field
- The entered email should not be overwritten or blanked when the error message is added
It's kind of a weird space, for example in react (or in purview right now) I think you'd make each a controlled component that sets form values on blur. I also recall this issue in liveview. Forms are tricky!
Worth a shot anyways although I imagine there's some secret downside to diffing more.