paper-dropdown-menu
paper-dropdown-menu copied to clipboard
restore input to default if no element is selected
The paper-dropdown-menu-light shows label out of place when an item is selected and then all items are removed. i.e. Binding items to a firebase-query or any other dynamic source.
Expected outcome
paper-dropdown-menu-light should return to its default state if all content is removed.
Actual outcome
After items get deleted, the innerHTML of <div id="input"... is empty, instead of , which makes the div smaller and causes the label to show out of place.
Steps to reproduce
- Put a
paper-dropdown-menu-lighton the page. - Put a
paper-menuinside withclass="dropdown-content". - Put a
<template is="dom-repeat" ..inside withitemspointing to anarray - Select an element from the dropdown.
- Remove all elements from the
arrayusing the corresponding array mutation methods.
Test case: https://jsbin.com/qufitil/edit?html,output