Skip to content

Commit

Permalink
fixes #538 - loadOriginalValues triggers multiple change event
Browse files Browse the repository at this point in the history
  • Loading branch information
yairEO committed Feb 13, 2021
1 parent dea6128 commit 4525cc5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tagify.js
Expand Up @@ -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())
Expand Down Expand Up @@ -1437,7 +1437,7 @@ Tagify.prototype = {
.catch(reason => {})
},

removeAllTags(){
removeAllTags({ withoutChangeEvent }){
this.value = []

if( this.settings.mode == 'mix' )
Expand All @@ -1450,7 +1450,7 @@ Tagify.prototype = {
if( this.settings.mode == 'select' )
this.input.set.call(this)

this.update()
this.update({withoutChangeEvent})
},

postUpdate(){
Expand Down

0 comments on commit 4525cc5

Please sign in to comment.