Skip to content

Commit

Permalink
better handling of selectedItem when items array changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Juravenator committed Apr 26, 2017
1 parent c0c0cc2 commit 18f882f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions paper-dropdown-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -701,8 +701,15 @@
if (selectedItem) {
var displayValue = selectedItem[filterProperty] || selectedItem.label || selectedItem;
this.selectedItemLabel = displayValue;
} else {
this.selectedItemLabel = value;
}
else {
this.$.menu.selected = null;
if (this.freedom) {
this.selectedItemLabel = value;
}
else {
this.selectedItemLabel = null;
}
}
},

Expand Down

0 comments on commit 18f882f

Please sign in to comment.