-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There are some use cases in which a large amount of independent changes are performed in an extremely low amount of time, potentially leading to data loss or endless rerendering loops when using the React bindings. An example for such a use case is Chrome auto-fill which can cause JSON Forms to emit multiple change events before the parent component is rerendered. If the parent component feeds the emitted data back to JSON Forms then it will hand over not the latest data, but the previouslys emitted data first. JSON Forms recognizes that this is not the very recent data and will validate, rerender and emit a change event again, leading to the problematic behavior. To handle these edge cases in which many change events are sent in an extremely short amount of time we debounce them over a short amount of time. We debounce the emitted events instead of the incoming data as we don't know anything about the amount of work performed (and therefore time passed) on the emitted data.
- Loading branch information
Showing
2 changed files
with
45 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters