-
Notifications
You must be signed in to change notification settings - Fork 24
Introduce patched state update #354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a8cd0df
to
7a114e4
Compare
These changes may not fully solve the concurrency issue, but they prepare a great background for such concurrency handling, and open new possibilities of building detailed dev tools. |
92323f2
to
e81c188
Compare
76fe898
to
7ca96e5
Compare
7ca96e5
to
42a3bd4
Compare
There is currently an issue with the value change, as it sometimes returns obsolete (accumulated) value after quick clean/type. This has been common before, and was solved, unfortunately this issue is back now. Most likely there is an issue during field change/blur related to field state that is passed to the validation. Obsolete value most probably comes from the postponed validation. Update: The issue was caused by the |
2075347
to
8e6be40
Compare
Although patched state updates eradicate field value concurrency issue that required to have a |
I've tried to simplify record utils as a part of function call signature adjustment, and I can conclude that indeed a lot of payload coming into utility functions can be omitted, or replaced with the existing payload. I can't say it's perfect now, but some complicated utils ( |
Description:
Adjust Form state updates to be applied in patches. Event subscription listens to patched update events dispatched, accumulates them, and updates the Form state with the respective chunk information. This eliminates obsolete state properties, which are properties irrelevant to the occurring update (i.e.
value
property being updated during blur).In comparison, previously, a value change event produced the entire next field state:
With patched state updates the value change event will produce only the following patch:
The state patch is then deep merged via a single event handler into the existing Form state.
Tickets:
Roadmap:
Form.updateFieldsWith
Form.fieldsDidUpdate
Reactive props (Single target): Adjust to cover Changing values with form.setValues() in an onChange() handler removes reactive props #364 and passvalue
during field change (fixed by 223ed93)Field.props.rule
error message (name/type/general)form.reset()