PolymerElements / paper-dropdown-menu

A Material Design browser select element
https://www.webcomponents.org/element/PolymerElements/paper-dropdown-menu
61 stars 107 forks source link

Fixes #163: Adds `close-on-activate` attribute. #168

Closed bicknellr closed 8 years ago

bicknellr commented 8 years ago

Adding the close-on-activate attribute will close the menu when it receives any iron-activate event.

Fixes #163, #72

valdrinkoshi commented 8 years ago

@bicknellr I've added to the issue in the description to create the link

valdrinkoshi commented 8 years ago

Implementation looks good, can you add some unit tests please?

valdrinkoshi commented 8 years ago

After looking at the issue more closely, I think it is better to handle it in paper-menu-button (responsible of closing the dropdown on selection change). It could have a tap listener and close the dropdown when that happens. WDYT?

bicknellr commented 8 years ago

@valdrinkoshi Ok, I'll open a new PR there.

bicknellr commented 8 years ago

Given that paper-dropdown-menu wraps a paper-menu-button, should paper-dropdown-menu expose the underlying paper-menu-button's close-on-activate flag or just set it automatically? Does anyone not want this behavior for paper-dropdown menus?

bicknellr commented 8 years ago

Here's the paper-menu-button PR: PolymerElements/paper-menu-button#90. I'll update this one to add / expose close-on-activate depending on how you think that should work here.

valdrinkoshi commented 8 years ago

Awesome! Yeah I believe it makes sense to automatically set close-on-activate here.

valdrinkoshi commented 8 years ago

LGTM