Search code examples
polymerdart-polymerpaper-elements

How to use paper-dropdown-menu to select multiple items?


Is there a way use paper-dropdown-menu to let the user select multiple items when the dropdown opens and then close it by tapping outside of it? Currently, the dropdown closes each time one item is tapped. I think this question is similar to this one, but I do not understand how to proceed with the solution mentioned there. Thanks!

<paper-dropdown-menu label="General">
  <paper-dropdown class = "dropdown">
     <core-menu class = "menu"  multi>
        <paper-item name = "item1">item1</paper-item>
        <paper-item name = "item2">item2</paper-item>
        <paper-item name = "item3">item3</paper-item>
     </core-menu>
  </paper-dropdown>
</paper-dropdown-menu>

Solution

  • I think paper-dropdown-menu/ core-dropdown-menu isn't for your case. Because they always toggle state. But you can open menu manually as in this (openDropdown function)