F7.2.3.1 demo
// Multiple Standalone
self.autocompleteStandaloneMultiple = app.autocomplete.create({
openIn: 'page', //open in page
openerEl: '#autocomplete-standalone-multiple', //link that opens autocomplete
multiple: true, //allow multiple values
source: function (query, render) {
var autocomplete = this;
var results = [];
if (query.length === 0) {
render(results);
return;
}
// Find matched items
for (var i = 0; i < fruits.length; i++) {
if (fruits[i].toLowerCase().indexOf(query.toLowerCase()) >= 0) results.push(fruits[i]);
}
// Render items by passing array with result items
render(results);
},
on: {
change: function (value) {
// Add item text value to item-after
$('#autocomplete-standalone-multiple').find('.item-after').text(value.join(', '));
// Add item value to input value
$('#autocomplete-standalone-multiple').find('input').val(value.join(', '));
}
}
});
openIn: ‘page’ : change : openIn: ‘popup’ is work