Skip to content
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

[Feature] DropdownItem disabled option #709

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

jenkrisu
Copy link
Collaborator

Description

Adds disabled option to DropdownItem.

Motivation and Context

Dropdown had possibility to disable an option when it was implemented with Reach. Adding disabled prop makes functionality same as before.

How Has This Been Tested?

Windows (NVDA) Chrome, Edge, Firefox
iOS (VoiceOver) Safari, Chrome
Android, Chrome (BrowserStack)
Mac, Safari (BrowserStack)

Screenshots (if appropriate):

dropdown-disabled-option

Release notes

(none)

private handleKeyDown = (event: React.KeyboardEvent) => {
const { focusedDescendantId, showPopover } = this.state;
const popoverItems = Array.isArray(this.props.children)
? this.props.children
: [this.props.children];
: this.props.children !== undefined
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed logic here, because previously it was possible to have popOverItems = [undefined] (truthy) and this never returned

@jenkrisu jenkrisu force-pushed the feature/dropdown-disabled-option branch from f6a2ee2 to 621322a Compare April 17, 2023 08:12
@jenkrisu jenkrisu merged commit dec2ccc into develop Apr 17, 2023
@jenkrisu jenkrisu deleted the feature/dropdown-disabled-option branch April 17, 2023 11:57
@jenkrisu jenkrisu mentioned this pull request Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants