Skip to content

Commit

Permalink
no need to place loadOriginalValues within a setTimeout because it'…
Browse files Browse the repository at this point in the history
…s automatically fired from "observeOriginalInputValue"
  • Loading branch information
Yair Even Or authored and Yair Even Or committed Nov 5, 2021
1 parent 790bf98 commit a1c446c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/tagify.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ function Tagify( input, settings ){
initDropdown.call(this)

this.getCSSVars()

setTimeout(() => this.loadOriginalValues())
this.loadOriginalValues()

this.events.customBinding.call(this);
this.events.binding.call(this)

input.autofocus && this.DOM.input.focus()
}

Expand Down Expand Up @@ -988,7 +986,7 @@ Tagify.prototype = {


if( !this.settings.duplicates )
// also filter out items which have already been matches in previous iterations
// also filter out items which have already been matched in previous iterations
filteredList = filteredList.filter(filteredItem => !whitelistMatchesValues.includes(filteredItem.value))

// get the best match out of list of possible matches.
Expand Down

0 comments on commit a1c446c

Please sign in to comment.