-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent unnecessary execution of the
displayValue
callback in the `…
…ComboboxInput` component (#3048) * memoize the `currentDisplayValue` This used to be re-executed every single render. This should typically not be an issue, but if you use non-deterministic code (E.g.: `Math.random`, `Date.now`, …) then it could result in incorrect values. Using `useMemo` allows us to only re-run it if the `data.value` or thte `displayValue` actually changes. * add test to verify `currentDisplayValue` is stable * update changelog
- Loading branch information
1 parent
834dbf4
commit 000e0c0
Showing
4 changed files
with
92 additions
and
2 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
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