This repository has been archived by the owner on Mar 13, 2018. It is now read-only.
Allow closing a dropdown be prevented when certain elements are tapped #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello all the Polymer people!
I think it would be a pretty useful feature to have the ability to prevent core-dropdown-base (and by extension, core-dropdown-menu and paper-dropdown-menu) from closing the overlay when certain elements are tapped. A good example would be a search form to filter the items provided in the dropdown.
I've come up with quite a simple way to do this by providing an attribute (core-dropdown-keep, though I'm not too sure that that's the best name) that you can set on an element in the overlay, which causes the toggleOverlay method to ignore it when it reacts to a tap.
Please let me know what you think about this.
Best regards,
Niels