From 63b5d785b7e08022277385c625a60e32ae630576 Mon Sep 17 00:00:00 2001 From: trading_peter Date: Sat, 19 Mar 2022 23:54:58 +0100 Subject: [PATCH] Fix method call for updates when items are changed. --- package.json | 2 +- tp-dropdown.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 99dedcf..bf98485 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@tp/tp-dropdown", - "version": "1.0.0", + "version": "1.0.1", "description": "", "main": "tp-dropdown.js", "scripts": { diff --git a/tp-dropdown.js b/tp-dropdown.js index 719577e..8f23d7d 100644 --- a/tp-dropdown.js +++ b/tp-dropdown.js @@ -348,6 +348,10 @@ class TpDropdown extends BaseElement { this._focusChanged(this.focused, changes.get('focused')); } + if (changes.has('items')) { + this._itemsChanged(); + } + if (changes.has('value')) { this._valueChanged(); this.dispatchEvent(new CustomEvent('value-changed', { detail: this.value, bubbles: true, composed: true }));