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

Add stopPropagation to the Dropdown class #6613

Open
wants to merge 2 commits into
base: v1-dev
Choose a base branch
from

Conversation

BrendanBehr
Copy link

This commit re-adds the stopPropagation property to a dropdown for the dropdown trigger

Proposed changes

Adding the stopPropagation property allows an html element that contains a dropdown trigger to have a click event that does not get triggered when selecting the dropdown trigger.

Screenshots (if appropriate) or codepen:

In this example I have two chips with an ellipsis icon as the dropdown trigger, The left chip fires the chip event when you click on the chip and anything related to the dropdown trigger. The right chip contains the click event on the text which is not ideal because there is un-clickable space on the chip and if I want to add an icon to the left of the text I would need to wrap the icon and text in a span that has a click event.

Types of changes

  • Bug fix (non-breaking change which fixes an issue).
  • [ x ] New feature (non-breaking change which adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to change).

Checklist:

  • [ x ] I have read the CONTRIBUTING document.
  • [ x ] My change requires a change to the documentation.
  • [ x ] I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

This commit re-adds teh stopPropagation property to a dropdown for the dropdown trigger
Updates the docs for the dropdown
@BrendanBehr
Copy link
Author

Dropdown - click stopPropagation #1683

This is the closest issue I could find. I thought I saw comment related to this somewhere but Im having a hard time finding it,

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