This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
feat(dropdown): autocontrolled mode for open state #900
Merged
Conversation
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
Currently blocked by possible The The first/last item is not highlighted by default anymore after introducing
|
docs/src/examples/components/Dropdown/Usage/DropdownExampleControlled.shorthand.tsx
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #900 +/- ##
==========================================
- Coverage 80.42% 80.38% -0.04%
==========================================
Files 659 656 -3
Lines 8412 8392 -20
Branches 1488 1424 -64
==========================================
- Hits 6765 6746 -19
+ Misses 1632 1631 -1
Partials 15 15
Continue to review full report at Codecov.
|
831b1e0
to
48f4bd3
Compare
48f4bd3
to
ad80f11
Compare
07b3939
to
161ab7d
Compare
161ab7d
to
418eb37
Compare
docs/src/examples/components/Dropdown/Usage/DropdownExampleControlled.shorthand.tsx
Outdated
Show resolved
Hide resolved
layershifter
approved these changes
Feb 20, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only one small comment left, LGTM 👍
- introduced `open`, `defaultOpen` props - introduced `onOpenChange` event handled
- reordered handlers and render function
418eb37
to
dbcd0dc
Compare
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.
feat(dropdown): autocontrolled mode for open state
Description:
open
,defaultOpen
propsonOpenChange
event handlerAPI:
where
open
value is part of the state of HOC andhandleOpenChange
is the entry for internal changes ofopen
.Screenshot:
Blockers:
Currently blocked by possible
Downshift
issue related to internal state handling whenisOpen
prop is used in controlled mode.The
Dropdown
still works but there is a regression when opening the list of items:The first/last item is not highlighted by default anymore after introducing
open
prop.Here is the expected screener regression
@silviuavram has more details