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

fix(tag): pass props.disabled to close button #5996

Merged
merged 6 commits into from
May 13, 2020

Conversation

janhassel
Copy link
Member

Closes #5995

This passes props.disabled to the button element in filter tags to prevent firing onClose. Also fixes pointer cursor on hover.

Currently, the filter tag still emits onClick because the body element is a div instead of a button. This was introduced in #5470 since the tag body shouldn't be a click target anymore. If I understand correctly this means onClick will be deprecated, right?

Changelog

New

  • disabled attribute on button.bx--tag__close-icon
  • explicit cursor: not-allowed on .bx--tag__close-icon:disabled

Testing / Reviewing

  • Verify onClose is not firing when the close button is clicked on a disabled tag
  • Verify cursor on close button hover when disabled

@janhassel janhassel requested a review from a team as a code owner May 1, 2020 07:10
@ghost ghost requested review from aledavila and joshblack May 1, 2020 07:10
@netlify
Copy link

netlify bot commented May 1, 2020

Deploy preview for carbon-elements ready!

Built with commit 639f484

https://deploy-preview-5996--carbon-elements.netlify.app

@netlify
Copy link

netlify bot commented May 1, 2020

Deploy preview for carbon-components-react ready!

Built with commit 639f484

https://deploy-preview-5996--carbon-components-react.netlify.app

@asudoh asudoh requested review from a team and aagonzales and removed request for a team May 2, 2020 00:16
Copy link
Member

@aagonzales aagonzales left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for fixing!

@janhassel janhassel requested a review from joshblack May 6, 2020 07:10
@tw15egan tw15egan merged commit 7f2d551 into carbon-design-system:master May 13, 2020
joshblack pushed a commit that referenced this pull request May 13, 2020
* fix(tag): pass props.disabled to close button

* fix(tag): un-nest disabled style

Co-authored-by: Josh Black <[email protected]>
Co-authored-by: Alessandra Davila <[email protected]>
(cherry picked from commit 7f2d551)
@janhassel janhassel deleted the fix-5995 branch July 10, 2020 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tag]: Filter tag fires onClick and onClose even when disabled
6 participants