Ver a proveniência

[fix] throttle running multiple times (#3962)

* [fix] throttle running multiple times

* [fix] lint
version-14
Rushabh Mehta há 8 anos
committed by Nabin Hait
ascendente
cometimento
224a06eef7
1 ficheiros alterados com 10 adições e 0 eliminações
  1. +10
    -0
      frappe/public/js/frappe/views/reports/query_report.js

+ 10
- 0
frappe/public/js/frappe/views/reports/query_report.js Ver ficheiro

@@ -364,6 +364,16 @@ frappe.views.QueryReport = Class.extend({
} }
}, },
refresh: function() { 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 // Run
var me = this; var me = this;




Carregando…
Cancelar
Guardar