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

FBCM-5217 [Bugfix] Disabled Typeahead Still Allows Changing Selection #256

Merged
merged 6 commits into from
Jan 19, 2023

Conversation

boygao1992
Copy link
Member

@boygao1992 boygao1992 commented Jan 18, 2023

What does this pull request do?

Before, when a single-value Typeahead is disabled, one can still change the selection by clicking on Change button to open the item container and then make a selection there. Fixed by not registering ToggleClick action on the Change button (a span styled as a button which doesn't support disabled prop) when the Typeahead is disabled.

How should this be manually tested?

  • make
  • open dist/index.html and go to Typeahead tab (#typeaheads)
  • scroll down to Typeaheads - State Variants section, second example on the left, and click on the Change button
    • nothing should happen
    • you can check the broken behavior in current UI Guide for comparison

@boygao1992 boygao1992 requested review from a team and davezuch and removed request for a team January 18, 2023 21:36
Copy link
Member

@davezuch davezuch left a comment

Choose a reason for hiding this comment

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

Looks good! I might go one further and not have a link cursor when hovering disabled buttons, but maybe that's outside the scope of this fix.

@boygao1992
Copy link
Member Author

Thanks for the review!

@boygao1992 boygao1992 merged commit 22bc010 into main Jan 19, 2023
@boygao1992 boygao1992 deleted the wenbo/FBCM-5217/bugfix-disabled-typeahead branch January 19, 2023 16:50
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