Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add optional "disabled" prop to DropdownItem #495

Merged
merged 5 commits into from
Apr 30, 2020

Conversation

alexpaxton
Copy link
Contributor

@alexpaxton alexpaxton commented Apr 30, 2020

Closes #490

Changes

  • Allow both DropdownItem and DropdownLinkItem to be disabled
  • Update documentation for DropdownMenu to make it easier to test the above changes

Screenshots

dropdown-item-disabled

Checklist

Check all that apply

  • Updated documentation to reflect changes
  • Added entry to top of Changelog with link to PR (not issue)
  • Tests pass
  • Peer reviewed and approved
  • Signed CLA (if not already signed)

@alexpaxton alexpaxton requested a review from mavarius April 30, 2020 18:11
Copy link
Collaborator

@mavarius mavarius left a comment

Choose a reason for hiding this comment

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

Just one comment

@@ -21,6 +21,8 @@ export interface DropdownItemProps extends StandardFunctionProps {
wrapText?: boolean
/** Title attribute */
title?: string
/** Prevents any interaction with this element, including the onClick function */
disabled?: boolean
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we use status & ComponentStatus.Disabled here like we do in our other components? This would also allow us to disable it during some loading state and we could use it to toggle to active state styles.

@alexpaxton alexpaxton merged commit 9e57eef into master Apr 30, 2020
@alexpaxton alexpaxton deleted the disabled-dropdown-items branch April 30, 2020 23:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow dropdown items to be disabled
2 participants