vue-tags-input icon indicating copy to clipboard operation
vue-tags-input copied to clipboard

Duplicate call when using TAB in "add-on-key"

Open gotters opened this issue 5 years ago • 0 comments

This is what my property setup looks like

 <vue-tags-input
                  v-model="tag"
                  :tags="tags"
                   :autocomplete-items="filteredItems"
                   :add-on-key="[13,9, ':', ';']"
                  @tags-changed="newTags => tags = newTags"
                  @before-adding-tag="processTag" 
                  allow-edit-tags
                />

When I select an item from the auto-complete list it calls "processTag()" ONCE. However if I start typing in a tag and click the TAB key. It calles processTag() TWICE and therefore causes duplicates in the tags. Is this a known issue? Is there a way I can detect which key was pressed in the processTag method so that I can act accordingly? ie is there some workaround here.

Thanks

gotters avatar May 24 '20 11:05 gotters