Addresing requested changes

This commit is contained in:
kushthedude 2020-03-06 15:35:44 +05:30
parent 89b63bb8f8
commit 620d7672c9

View File

@ -127,13 +127,13 @@ TextSearchFacet.prototype._initializeUI = function() {
this._elmts.caseSensitiveCheckbox.bind("change", function() { this._elmts.caseSensitiveCheckbox.bind("change", function() {
self._config.caseSensitive = this.checked; self._config.caseSensitive = this.checked;
if (self._query !== null && self._query.length > 0) { if (self._query !== null && self._query.length > 0) {
setTimeout(function(){ self._scheduleUpdate(); }, 250); self._scheduleUpdate();
} }
}); });
this._elmts.regexCheckbox.bind("change", function() { this._elmts.regexCheckbox.bind("change", function() {
self._config.mode = this.checked ? "regex" : "text"; self._config.mode = this.checked ? "regex" : "text";
if (self._query !== null && self._query.length > 0) { if (self._query !== null && self._query.length > 0) {
setTimeout(function(){ self._scheduleUpdate(); }, 1500); self._scheduleUpdate();
} }
}); });
@ -202,7 +202,12 @@ TextSearchFacet.prototype._scheduleUpdate = function() {
var self = this; var self = this;
this._timerID = window.setTimeout(function() { this._timerID = window.setTimeout(function() {
self._timerID = null; self._timerID = null;
self._updateRest(); if(self._config.mode === 'regex') {
setTimeout(function(){ self._updateRest(); }, 1000);
}
else if (self._config.caseSensitive == true) {
setTimeout(function(){ self._updateRest(); }, 250);
}
}, 500); }, 500);
} }
}; };