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

refactor toggleDropdown click handler #992

Merged
merged 1 commit into from Nov 14, 2019
Merged

Conversation

sagalbot
Copy link
Owner

@sagalbot sagalbot commented Nov 11, 2019

The previous approach was to 'whitelist' specific parts of the component to allow them to toggle the dropdown. In reality, everything should toggle the dropdown, except:

  • items in the dropdown menu
  • deselect buttons (multiple select)
  • clear button

The refactor here introduces a couple new $refs for clear/deselect buttons. We check to see if the target is contained by one of these buttons, and exits early if true. This means that the click handlers should work properly while using slots to extend the component.


Related #962
Closes #882

@sagalbot sagalbot self-assigned this Nov 11, 2019
@sagalbot sagalbot added this to the v3.3 milestone Nov 11, 2019
@sagalbot sagalbot added the patch label Nov 11, 2019
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.5%) to 95.909% when pulling c84703d on selected-option-slot-bug into a85181b on master.

@sagalbot sagalbot merged commit 1d024d6 into master Nov 14, 2019
@sagalbot sagalbot deleted the selected-option-slot-bug branch November 30, 2019 18:00
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.

Clicking dropdown doesn't work if using selected-option slot.
2 participants