Simplifying EditableLabel on change event fire logic.
This commit is contained in:
		@@ -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"));
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user