From 4525cc5d77cff959c497619e9c909565bb3b0a80 Mon Sep 17 00:00:00 2001 From: vsync Date: Sat, 13 Feb 2021 12:01:40 +0200 Subject: [PATCH] fixes #538 - loadOriginalValues triggers multiple change event --- src/tagify.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tagify.js b/src/tagify.js index 5f369240..cd6bae4e 100644 --- a/src/tagify.js +++ b/src/tagify.js @@ -267,7 +267,7 @@ Tagify.prototype = { : this.DOM.originalInput.value) if( value ){ - this.removeAllTags() + this.removeAllTags({ withoutChangeEvent:true }) if( _s.mode == 'mix' ){ this.parseMixTags(value.trim()) @@ -1437,7 +1437,7 @@ Tagify.prototype = { .catch(reason => {}) }, - removeAllTags(){ + removeAllTags({ withoutChangeEvent }){ this.value = [] if( this.settings.mode == 'mix' ) @@ -1450,7 +1450,7 @@ Tagify.prototype = { if( this.settings.mode == 'select' ) this.input.set.call(this) - this.update() + this.update({withoutChangeEvent}) }, postUpdate(){