We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6126585 commit 41ba28fCopy full SHA for 41ba28f
src/select.js
@@ -403,10 +403,12 @@
403
// ctrl.tagging pushes items to ctrl.items, so we only have empty val
404
// for `item` if it is a detected duplicate
405
if ( item === undefined ) return;
406
+
407
// create new item on the fly if we don't already have one;
- // use tagging function if we have one, otherwise, push a string
408
- if ( ctrl.tagging.fct !== undefined && item === undefined ) {
+ // use tagging function if we have one
409
+ if ( ctrl.tagging.fct !== undefined && typeof item === 'string' ) {
410
item = ctrl.tagging.fct(ctrl.search);
411
+ // if item type is 'string', apply the tagging label
412
} else if ( typeof item === 'string' ) {
413
item = item.replace(ctrl.taggingLabel,'');
414
}
0 commit comments