Make sure call on shouldUpdate works for mixins and use value instead of id.
This commit is contained in:
parent
33214cb38b
commit
6ab1920ce3
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tp/tp-dropdown",
|
||||
"version": "1.3.2",
|
||||
"version": "1.3.4",
|
||||
"description": "",
|
||||
"main": "tp-dropdown.js",
|
||||
"scripts": {
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user