Metro-UI-CSS
Metro-UI-CSS copied to clipboard
dynamic auto complete
my problem is after each API call when new data arrives and i update the autocomplete list new suggestions wont refresh. is there a way after updating autocomplete list new information showing up?
$(document).on("change", "#FIELD", function(e) {
e.preventDefault();
$.get("/ajax.url.php", {
value: $("#FIELD").val()
}).then(
function(response) {
Metro.getPlugin("#NEW_FIELD", "input").setAutocompleteList(response);
},
function(xhr){
console.log(xhr.status, xhr.statusText);
});
});
Work for me!