Simplifying EditableLabel on change event fire logic.
This commit is contained in:
		| @@ -55,10 +55,7 @@ class EditableLabel extends IgniteElement { | |||||||
|         return { |         return { | ||||||
|             stopEditingOnBlur: true, |             stopEditingOnBlur: true, | ||||||
|             editing: false, |             editing: false, | ||||||
|             value: new IgniteProperty(null, () => { |             value: null, | ||||||
|                 //Emulate a change event to support value reflection. |  | ||||||
|                 this.dispatchEvent(new Event("change")); |  | ||||||
|             }), |  | ||||||
|             multiLine: false, |             multiLine: false, | ||||||
|             saveButton: true, |             saveButton: true, | ||||||
|             input: null, |             input: null, | ||||||
| @@ -102,6 +99,9 @@ class EditableLabel extends IgniteElement { | |||||||
|  |  | ||||||
|             if (this.input.innerHTML !== this.value) { |             if (this.input.innerHTML !== this.value) { | ||||||
|                 this.value = this.input.innerHTML; |                 this.value = this.input.innerHTML; | ||||||
|  |  | ||||||
|  |                 //Dispatch a native change event  | ||||||
|  |                 this.dispatchEvent(new Event("change")); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user