Make sure call on shouldUpdate works for mixins and use value instead of id.
This commit is contained in:
@@ -353,7 +353,7 @@ class TpDropdown extends BaseElement {
|
||||
this.dispatchEvent(new CustomEvent('is-open-changed', { detail: this.isOpen, bubbles: true, composed: true }));
|
||||
}
|
||||
|
||||
return true;
|
||||
return super.shouldUpdate(changes);
|
||||
}
|
||||
|
||||
updated(changes) {
|
||||
@@ -802,7 +802,7 @@ class TpDropdown extends BaseElement {
|
||||
if (Array.isArray(this.items)) {
|
||||
for (var i = 0, li = this.items.length; i < li; ++i) {
|
||||
if (String(this.items[i].label).toLowerCase() === String(label)) {
|
||||
this.value = this.items[i].id;
|
||||
this.value = this.items[i].value;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user