2017-05-18 6 views
0

나는 클라이언트 목록을 얻기 위해 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

+0

아무도 나를 도울 수 있습니까? – Funpro

답변

0

에서 발견 어떤 결과가 나는 probleme를 찾을 :

Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. 

problème은 JS 된 JQuery와 !!!!!!!!의있는 DateTimePicker 플러그인

+0

emm 내가 두 번째 문제점을 찾았을 때도 : scroll-blocking 'wheel'이벤트에 비 수동 이벤트 리스너가 추가되었습니다. 이벤트 처리기를 '수동적'으로 표시하여 페이지의 응답 성을 높이십시오. – Funpro