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

2.0-preview extends customElements.get does not work #240

Closed bmodeprogrammer closed 7 years ago

bmodeprogrammer commented 7 years ago

Description

If extend the paper-dropdown-menu in the last update, when select the item does not put on the paper-input the value. And does not appear the label

But an anterior version of 2.0-preview, in the version that does not needed to put the attribute slot on paper-listbox worked perfectly, but I did bower update because was a test project, and does not work anymore. And to test better, I created a new project only with the dropdown menu, and I tried to extends the dropdown but I get the same issue.

Expected outcome

When select, appears on the paper-input the value selected. And appear the label.

Actual outcome

Does not shows anything on paper-input and does not show the label.

Steps to reproduce

1 - bower init; 2 - bower install paper-dropdown-menu#2.0-preview --save 3 - create index.html and my-dropdown.html file 4 - on index import webcomponents loader, my-dropdown, paper-dropdown-menu, paper-listbox and paper-item 5 - on my-dropdown.html, extend the paper-dropdown-menu

<script>
  class MyDropdown extends customElements.get('paper-dropdown-menu') {
    static get is() {
      return 'my-dropdown';
    }

  }
  window.customElements.define(MyDropdown.is, MyDropdown);
</script>

6 - put the my-dropdown menu on index.html

<my-dropdown label="Dinosaurs">
          <paper-listbox slot="dropdown-content" class="dropdown-content">
            <paper-item>allosaurus</paper-item>
            <paper-item>brontosaurus</paper-item>
            <paper-item>carcharodontosaurus</paper-item>
            <paper-item>diplodocus</paper-item>
          </paper-listbox>
        </my-dropdown>

Browsers Affected