Fix method call for updates when items are changed.

This commit is contained in:
trading_peter 2022-03-19 23:54:58 +01:00
parent 2f7bb699de
commit 63b5d785b7
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@tp/tp-dropdown", "name": "@tp/tp-dropdown",
"version": "1.0.0", "version": "1.0.1",
"description": "", "description": "",
"main": "tp-dropdown.js", "main": "tp-dropdown.js",
"scripts": { "scripts": {

View File

@ -348,6 +348,10 @@ class TpDropdown extends BaseElement {
this._focusChanged(this.focused, changes.get('focused')); this._focusChanged(this.focused, changes.get('focused'));
} }
if (changes.has('items')) {
this._itemsChanged();
}
if (changes.has('value')) { if (changes.has('value')) {
this._valueChanged(); this._valueChanged();
this.dispatchEvent(new CustomEvent('value-changed', { detail: this.value, bubbles: true, composed: true })); this.dispatchEvent(new CustomEvent('value-changed', { detail: this.value, bubbles: true, composed: true }));