浏览代码

[fix] throttle running multiple times (#3962)

* [fix] throttle running multiple times

* [fix] lint
version-14
Rushabh Mehta 8 年前
committed by Nabin Hait
父节点
当前提交
224a06eef7
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. +10
    -0
      frappe/public/js/frappe/views/reports/query_report.js

+ 10
- 0
frappe/public/js/frappe/views/reports/query_report.js 查看文件

@@ -364,6 +364,16 @@ frappe.views.QueryReport = Class.extend({
}
},
refresh: function() {
// throttle
// stop refresh from being called multiple times (from triggers ?)
if (!this.request_refresh) {
this.request_refresh = setTimeout(() => {
this._refresh();
this.request_refresh = null;
}, 300);
}
},
_refresh: function() {
// Run
var me = this;



正在加载...
取消
保存