나는 클라이언트 목록을 얻기 위해 Select2 4.0.3을 사용하고있다. 내가 https://select2.github.io/examples.html의 코드를 사용할 때 : 내가 디부 ONT 크롬 콘솔의 네트워크에서 볼 때select2 ajax가 실행되지 않는다
`$ajax= $(".ClientSearchSc");
/* recherche select2 + ajax */
$ajax.select2({
ajax:{
url: url+"/ajax/Cmd/Clients.php",
dataType: 'json',
delay: 0,
data: function (params) {
console.log(params.term);
return {
q: params.term, // search term
page: params.page
};
}
,
processResults: function (data,params) {
// parse the results into the format expected by Select2
// since we are using custom formatting functions we do not need to
// alter the remote JSON data, except to indicate that infinite
// scrolling can be used
params.page = params.page || 1;
return {
results: data,
pagination: {
more: (params.page * 30) < data.total_count
}
};
},
cache: true
},
minimumInputLength: 1
,
escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
templateResult: clientiFormatResult,
templateSelection: clientiFormatSelection
});`
이 Client.php을 찾을 수 있습니다! 항상 reaserch 8 일 후에 선택 2
아무도 나를 도울 수 있습니까? – Funpro