enh: Text Filter waits until user finishes updating
Signed-off-by: kushthedude <kushthedude@gmail.com>
This commit is contained in:
parent
d9154f4dfe
commit
f96cb0e01f
@ -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) {
|
||||||
self._scheduleUpdate();
|
setTimeout(function(){ self._scheduleUpdate(); }, 250);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
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) {
|
||||||
self._scheduleUpdate();
|
setTimeout(function(){ self._scheduleUpdate(); }, 1500);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -203,7 +203,7 @@ TextSearchFacet.prototype._scheduleUpdate = function() {
|
|||||||
this._timerID = window.setTimeout(function() {
|
this._timerID = window.setTimeout(function() {
|
||||||
self._timerID = null;
|
self._timerID = null;
|
||||||
self._updateRest();
|
self._updateRest();
|
||||||
}, 500);
|
}, 2000);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user