Преглед на файлове

HUE-5056 [editor] Delay history and saved query search to when the user stop typing

Avoid tun of calls when typing more than one char
Romain Rigaux преди 10 години
родител
ревизия
449b2f5
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

+ 2 - 2
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -318,7 +318,7 @@ var EditorViewModel = (function() {
 
     self.queriesFilter = ko.observable('');
     self.queriesFilterVisible = ko.observable(false);
-    self.queriesFilter.extend({ rateLimit: 300 });
+    self.queriesFilter.extend({ rateLimit: { method: "notifyWhenChangesStop", timeout: 900 } });
     self.queriesFilter.subscribe(function(val){
       self.fetchQueries();
     });
@@ -1359,7 +1359,7 @@ var EditorViewModel = (function() {
     });
     self.historyFilter = ko.observable('');
     self.historyFilterVisible = ko.observable(false);
-    self.historyFilter.extend({ rateLimit: 300 });
+    self.historyFilter.extend({ rateLimit: { method: "notifyWhenChangesStop", timeout: 900 } });
     self.historyFilter.subscribe(function(val){
       self.fetchHistory();
     });