forked from rjsf-team/react-jsonschema-form
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Removed infinite loop in AltDateWidget
Fixes rjsf-team#3516 by removing the infinite loop caused by two `useEffects()` by adding a new state for the `value` and combining the effects into one - Updated `AltDateWidget` to stash the `value` in state and combining the two `useEffects()` into a single effect - The effect will call `onChange()` when the `state` is ready for change AND it causes a different string than the current `value` - If the `lastValue` recorded differs from the `value`, then we record the new `value` and set the `state` to it - Updated the `CHANGELOG.md` accordingly
- Loading branch information
1 parent
147a6a2
commit 24d75b2
Showing
2 changed files
with
19 additions
and
14 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