2017-05-18 12 views
0

私はクライアントのリストを取得するためにSelect2 4.0.3を使用しています。 私はhttps://select2.github.io/examples.htmlのコードを使用する場合:私はD'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日後にSELECT2

+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削除しても2番目の問題が見つかりました:非受動的なイベントリスナーをスクロールブロックの 'wheel'イベントに追加しました。ページをより敏感にするには、イベントハンドラを「パッシブ」としてマークすることを検討してください。 – Funpro

関連する問題