Skip to content

Commit

Permalink
prepareNewTagNode method should return the modified tagData which…
Browse files Browse the repository at this point in the history
… includes the `__isValid` property
  • Loading branch information
yairEO committed Feb 12, 2024
1 parent c29dbad commit 80b348d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tagify.js
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ Tagify.prototype = {
// Create tag HTML element
tagElm = this.createTagElem(tagData, tagElmParams)

return {tagElm, aggregatedInvalidInput}
return {tagElm, tagData, aggregatedInvalidInput}
},

/**
Expand Down Expand Up @@ -1311,7 +1311,8 @@ Tagify.prototype = {
const newTagNode = this.prepareNewTagNode(tagData, {skipInvalid: skipInvalid || _s.skipInvalid}),
tagElm = newTagNode.tagElm;

aggregatedInvalidInput = newTagNode.aggregatedInvalidInput
tagData = newTagNode.tagData
aggregatedInvalidInput = newTagNode.aggregatedInvalidInput

tagElems.push(tagElm)

Expand Down

0 comments on commit 80b348d

Please sign in to comment.