Object passed to on-tag-added with use-strings="true"
Opened this issue · 0 comments
cgatesman commented
If you use use-strings="true"
along with on-tag-added
(or other callbacks), the $tag
passed to the onTagAdded($tag)
function is an object (e.g. {text: 'Tag Name'}
) instead of just the tag name string. In addition to this, on the first tag add, the tagsInput model within the onTagAdded($tag)
function call is an array of objects instead of an array of strings. On additional adds, the model in onTagAdded($tag)
is the correct array of strings; however, it is missing the newly added tag.
One thing to note: If you put a $timeout
in the onTagAdded($tag)
function, the model is always correct after the $timeout
.