diff --git a/package.json b/package.json index eb6d253..dfad173 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tp/tp-dropdown", - "version": "1.3.2", + "version": "1.3.4", "description": "", "main": "tp-dropdown.js", "scripts": { diff --git a/tp-dropdown.js b/tp-dropdown.js index c06452e..28b0653 100644 --- a/tp-dropdown.js +++ b/tp-dropdown.js @@ -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; } }