From d194ed6959acde71f84cae761fd2400c125463b0 Mon Sep 17 00:00:00 2001 From: Matt Mo Date: Wed, 18 Nov 2020 11:26:50 -0800 Subject: [PATCH] Simplifying EditableLabel on change event fire logic. --- editable-label.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/editable-label.js b/editable-label.js index e2f4db4..923cd4d 100644 --- a/editable-label.js +++ b/editable-label.js @@ -55,10 +55,7 @@ class EditableLabel extends IgniteElement { return { stopEditingOnBlur: true, editing: false, - value: new IgniteProperty(null, () => { - //Emulate a change event to support value reflection. - this.dispatchEvent(new Event("change")); - }), + value: null, multiLine: false, saveButton: true, input: null, @@ -102,6 +99,9 @@ class EditableLabel extends IgniteElement { if (this.input.innerHTML !== this.value) { this.value = this.input.innerHTML; + + //Dispatch a native change event + this.dispatchEvent(new Event("change")); } } }