This repository was 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
Open
ngrewe wants to merge 2 commits intogooglearchive:masterfrom
Open
Allow closing a dropdown be prevented when certain elements are tapped#17ngrewe wants to merge 2 commits intogooglearchive:masterfrom
ngrewe wants to merge 2 commits intogooglearchive:masterfrom
Conversation
(`core-dropdown-keep') that prevents them from being evaluated for closing the dropdown on tap. This is useful for instance if you have a search form, etc. within the dropdown that you want the user to be able to tap on without closing the menu.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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