This repository was 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(FocusZone): Handle keyDownCapture based on client needs #563
Merged
sophieH29
merged 13 commits into
master
from
feat/focus-zone-keydown-capture-based-on-prop
Dec 11, 2018
Merged
feat(FocusZone): Handle keyDownCapture based on client needs #563
sophieH29
merged 13 commits into
master
from
feat/focus-zone-keydown-capture-based-on-prop
Dec 11, 2018
Conversation
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
…://github.com/stardust-ui/react into feat/focus-zone-keydown-capture-based-on-prop
jurokapsiar
approved these changes
Dec 5, 2018
silviuaavram
approved these changes
Dec 10, 2018
@@ -58,6 +58,11 @@ export interface FocusZoneProps extends React.HTMLAttributes<HTMLElement | Focus | |||
*/ | |||
shouldFocusFirstElementWhenReceivedFocus?: boolean | |||
|
|||
/** | |||
* If global onKeyDownCapture should be handled and updating tab indexes |
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.
NIT: Missing trailing dot 😸
layershifter
approved these changes
Dec 10, 2018
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.
This change looks like a reasonable to me.
@sophieH29 We changed |
kuzhelov
approved these changes
Dec 11, 2018
1 task
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.
This PR aims to extend FocusZone API, so the client can decide whether global
onKeyDownCapture
should be handled or the client wants to control tab indexes on his own.The current use case for that is when using Chat with VirtualList, chat items are loaded asynchronously so FocusZone doesn't know when items are in place so it can update tab indexes in incorrect order. It's only happens when we Tab to chat. As long as tab indexes are set by client in correct order (as they are aware of the whole state and ecosystem of Virtual list), FocusZone will handle the rest (navigation with keys, and updating tabindexes while navigating)