This repository was archived by the owner on Mar 4, 2020. It is now read-only.
fix(Dropdown): call getDerivedStateFromProps() from AutoControlledComponent#1416
Merged
layershifter merged 8 commits intomasterfrom May 29, 2019
Merged
fix(Dropdown): call getDerivedStateFromProps() from AutoControlledComponent#1416layershifter merged 8 commits intomasterfrom
layershifter merged 8 commits intomasterfrom
Conversation
Contributor
|
Based on the screenshot differences it seems that we broke the multiple Dropdown variations. When something is picked in the multiple search, it should not appear in the list. |
Codecov Report
@@ Coverage Diff @@
## master #1416 +/- ##
==========================================
- Coverage 73.59% 73.59% -0.01%
==========================================
Files 787 787
Lines 5889 5888 -1
Branches 1737 1717 -20
==========================================
- Hits 4334 4333 -1
Misses 1549 1549
Partials 6 6
Continue to review full report at Codecov.
|
mnajdova
reviewed
May 29, 2019
mnajdova
reviewed
May 29, 2019
kuzhelov
reviewed
May 29, 2019
packages/react/test/specs/components/Dropdown/Dropdown-test.tsx
Outdated
Show resolved
Hide resolved
kuzhelov
approved these changes
May 29, 2019
bmdalex
approved these changes
May 29, 2019
mnajdova
reviewed
May 29, 2019
| static getDerivedStateFromProps(props: DropdownProps, state: DropdownState) { | ||
| static getDerivedStateFromProps(props: DropdownProps, currentState: DropdownState) { | ||
| // Due inheritance of AutoControlled component we should call its getDerivedStateFromProps(), | ||
| // to properly compute next state we should merge it with existing |
Contributor
There was a problem hiding this comment.
// Due to the inheritance of the AutoControlledComponent we should call its getDerivedStateFromProps() and merge it with the existing state
mnajdova
approved these changes
May 29, 2019
This was referenced Jun 4, 2019
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1412.
This issues is caused by inheritance of
AutocontrolledComponentbyDropdown, we should itsgetDerivedStateFromProps()to properly compute props.