Reputation: 425
I am going to use Bootstrap TagsInput and Bootstrap Typeahead in one of my project.
When I start typing, Typeahead will show the suggestions. If I press [ENTER], It will add correctly. but there is a problem that when i type somthing and press [Comma button , ] it do nothing.
Here is my Input:
<input type="text" autocomplete="false" id="tags" name="tags">
JS Codes:
$('#tags').tagsinput({
confirmKeys: [13, 188],
typeahead : {
afterSelect: function(val) { this.$element.val(""); },
displayKey: 'text',
valueKey: 'value',
source: [
{ "value":"test1", "text":"test1" },
{ "value":"test2", "text":"test2" }
]
},
freeInput: true,
itemValue: 'value',
itemText: 'text',
});
Upvotes: 2
Views: 1307