Closed gzai closed 5 years ago
Hello,
var elt = $('.tags'); elt.tagsinput({ itemValue: 'id', itemText: 'title', trimValue: true, allowDuplicates: false, maxTags: 10, typeahead: { name: 'tags', displayKey: 'title', source: function(query) { return $.get( url , { search: query, return: 'data' }, function (values) { return values; }); }, afterSelect: function() { this.$element[0].value = ''; } } });
why tagsinput with typeahead adding [] in input value when input tag is empty? I type in console browser $('.tags').val(); , return value is "[]" . how to remove this value "[]" when input tag is empty ?
Thanks
Hello,
why tagsinput with typeahead adding [] in input value when input tag is empty? I type in console browser $('.tags').val(); , return value is "[]" . how to remove this value "[]" when input tag is empty ?
Thanks