weixin_33737774 2018-01-30 15:17 采纳率: 0%
浏览 359

select2延迟不起作用

I am using below code to initialise select2 on a select box. But the delay is not working, requests are going to server immediately.

$(".multi_select").select2({
    multiple: true,
    allowClear: true,
    minimumInputLength: 2,
    delay: 5000,
    ajax: {
      url: "/search.json",
      dataType: 'json'
    }
  });

Another problem I am facing is, I am getting abort error on fast typing, that means previous requests are not getting aborted. Yesterday when I added above code, without delay, it was working fine without 'abort' error. Today, it gives abort error, with and without delay along with failure of delay.

I am using v4.0.3 and there is no change in project since yesterday so I don't understand that what happened suddenly.

  • 写回答

1条回答

      报告相同问题?

      相关推荐 更多相似问题

      悬赏问题

      • ¥15 SQL查询一个表格的数据
      • ¥20 PCL库处理梯子点云获取其几何参数
      • ¥30 医疗资料ROI mask转YOLO的bounding box
      • ¥15 docx4j word转pdf
      • ¥15 MATLAB-GUI数据图表
      • ¥15 Qt Vs2017使用Charts异常
      • ¥15 将位图选入内存DC失败,但没有出错信息
      • ¥20 如何从 .html url 启动/激活 .py 文件(sql debug)
      • ¥15 c#调用soap出错,soapui中可以
      • ¥100 CBIS-DDSM kaggle 资料处理