mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into refactor/sk-12-21
This commit is contained in:
@ -4,11 +4,12 @@
|
||||
* @param {String} url
|
||||
* @param {String} placeholder
|
||||
*/
|
||||
let ClassSelect = function (domItem, url, placeholder, allowClear = false, params = {}, dropdownParent = "") {
|
||||
let ClassSelect = function (domItem, url, placeholder, allowClear = false, params = {}, dropdownParent = "", hideSearch = false) {
|
||||
this.url = url;
|
||||
this.item = domItem;
|
||||
this.params = params;
|
||||
this.dropdownParent = dropdownParent;
|
||||
this.hideSearch = hideSearch;
|
||||
|
||||
this.config = {
|
||||
placeholder: placeholder,
|
||||
@ -48,6 +49,11 @@ let ClassSelect = function (domItem, url, placeholder, allowClear = false, param
|
||||
};
|
||||
this.init = function () {
|
||||
if (this.item.length) {
|
||||
|
||||
if(this.hideSearch){
|
||||
this.config.minimumResultsForSearch = -1;
|
||||
}
|
||||
|
||||
this.item = this.item.select2(this.config);
|
||||
// $.fn.modal.Constructor.prototype.enforceFocus = function () {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user