googlearchive / paper-menu

A Material Design menu
https://www.webcomponents.org/element/PolymerElements/paper-menu
27 stars 48 forks source link

paper-submenu(s) inside paper-menu #74

Open xynosh opened 8 years ago

xynosh commented 8 years ago

Then I select an item in my outer paper-menu and after that I navigate into my submenu and select an item there, the outer-item is still selected. also conversely:

    <paper-menu class="list" attr-for-selected="data-route" selected="[[route]]" selectable="a">
      <a data-route="one" href="{{baseUrl}}">
        <iron-icon icon="home"></iron-icon>
        <span>one</span>
      </a>
      <paper-submenu>
        <paper-item class="menu-trigger">two</paper-item>
        <paper-menu class="menu-content">
            <a data-route="two-1" href="{{baseUrl}}two-1">
          <paper-item>
                <iron-icon icon="home"></iron-icon>
                <span>two 1</span>
              </paper-item>
              </a>
          <a data-route="two-2" href="{{baseUrl}}two-2">
          <paper-item> 
                <iron-icon icon="info"></iron-icon>
                <span>two 2</span>
              </paper-item>
              </a>
        </paper-menu>
      </paper-submenu>
      <a data-route="users" href="{{baseUrl}}users">
        <iron-icon icon="info"></iron-icon>
        <span>Users</span>
      </a>

      <a data-route="contact" href="{{baseUrl}}contact">
        <iron-icon icon="mail"></iron-icon>
        <span>Contact</span>
      </a>
    </paper-menu>

Any idea how to fix it?

s-devaney commented 8 years ago

+1

I believe this is intended functionality(?) but I'd argue it shouldn't be.

bicknellr commented 8 years ago

Yes, this is intended behavior at the moment. I agree, there's room for argument about making paper-menu more like native menus and letting paper-listbox take over the select element -like use cases. The distinction here needs more thought.

kevinpschaaf commented 8 years ago

This is current behavior, marking as enhancement for potential improvement.