1
我編寫了任何文本,並向我顯示與文本不匹配的結果。 無論我在現場插入什麼,select2都會始終顯示所有結果。Select2顯示所有結果
$("#UserCliente").select2({
minimumInputLength: 3,
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper
url: "../clients/listaclients/",
dataType: 'json',
data: function (term) {
return {
term: term, // search term
};
},
results: function (data) { // parse the results into the format expected by Select2.
// since we are using custom formatting functions we do not need to alter remote JSON data
return {results: data};
}
},
});
這是怎麼回事?