From 4ca7ebaa7b094a7b16166bbc3df02b07303be5f8 Mon Sep 17 00:00:00 2001 From: Daniel Kladnik Date: Mon, 22 Jul 2024 12:33:56 +0200 Subject: [PATCH] filterMinChars option put into use --- dist/js/bootstrap-autocomplete.js | 1 + docs/js/bootstrap-autocomplete.js | 1 + 2 files changed, 2 insertions(+) diff --git a/dist/js/bootstrap-autocomplete.js b/dist/js/bootstrap-autocomplete.js index c53921a..4139ba3 100644 --- a/dist/js/bootstrap-autocomplete.js +++ b/dist/js/bootstrap-autocomplete.js @@ -455,6 +455,7 @@ if (!this._config.filter) return; if (this._dropdown.children.length >= this._config.maxResult) return; + if (this._query.length < this._config.filterMinChars) return; if (this._timer) clearTimeout(this._timer); var vval = this._query; this._timer = setTimeout(function () { diff --git a/docs/js/bootstrap-autocomplete.js b/docs/js/bootstrap-autocomplete.js index c53921a..4139ba3 100644 --- a/docs/js/bootstrap-autocomplete.js +++ b/docs/js/bootstrap-autocomplete.js @@ -455,6 +455,7 @@ if (!this._config.filter) return; if (this._dropdown.children.length >= this._config.maxResult) return; + if (this._query.length < this._config.filterMinChars) return; if (this._timer) clearTimeout(this._timer); var vval = this._query; this._timer = setTimeout(function () {