-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix arrow focus shortcut modal local state (v2.0) #18599
Changes from 4 commits
61b98dd
4f075e4
793851f
73bb00e
6a543bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,6 @@ class BaseOptionsSelector extends Component { | |
enterConfig.modifiers, | ||
true, | ||
() => !this.state.allOptions[this.state.focusedIndex], | ||
1, | ||
); | ||
|
||
const CTRLEnterConfig = CONST.KEYBOARD_SHORTCUTS.CTRL_ENTER; | ||
|
@@ -360,7 +359,7 @@ class BaseOptionsSelector extends Component { | |
text={defaultConfirmButtonText} | ||
onPress={this.props.onConfirmSelection} | ||
pressOnEnter | ||
enterKeyEventListenerPriority={2} | ||
enterKeyEventListenerPriority={1} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We lowered this from 2 to 1 because now the priority for the enter key is 0 correct? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm guessing that is the case. Do you think we should just leave as 2? This change came from this PR: #18578 |
||
/> | ||
)} | ||
{this.props.footerContent} | ||
|
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.
Why don't we want to init with the store value?
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 is kind of NAB but I would still like to know why we changed this.
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.
Because it was causing problems here: #18578 (comment)
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1683563738386549?thread_ts=1683551147.132719&cid=C01GTK53T8Q
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.
I see, ok that works for me. It's definitely not necessary for the keyboard shortcuts modal to persist it's open state between refreshes.