Improve the useability of HTML <select> elements:
@@ -66,6 +66,7 @@
filterText - text to show in filter when empty. default="Filter"
selectAllText - label for the select all dropdown item. default="Select All"
labelText - label to display in the main dropdown. default=""
+
selectionLimit - limit the number of items able to be selected. Choosing 1 or omitting the multiple attribute turns this into a single select. A value of 0 means no limit. default="0"
caseSensitive - whether filtering is case-sensitive. default=false
allowEnablingAndDisabling - whether programmatically toggling disabled is permitted. default=true
items - array of additional items to append to options in dropdown. Each array entry should have the form:
diff --git a/dist/FilterMultiSelect.js b/dist/FilterMultiSelect.js
index 703684b..9309844 100644
--- a/dist/FilterMultiSelect.js
+++ b/dist/FilterMultiSelect.js
@@ -40,15 +40,17 @@ var NULL_OPTION = new /** @class */ (function () {
class_1.prototype.enable = function () { };
class_1.prototype.disable = function () { };
class_1.prototype.isSelected = function () { return false; };
- class_1.prototype.isDisabled = function () { return false; };
+ class_1.prototype.isDisabled = function () { return true; };
class_1.prototype.getListItem = function () { return document.createElement('div'); };
class_1.prototype.getSelectedItemBadge = function () { return document.createElement('div'); };
class_1.prototype.getLabel = function () { return 'NULL_OPTION'; };
class_1.prototype.getValue = function () { return 'NULL_OPTION'; };
class_1.prototype.show = function () { };
class_1.prototype.hide = function () { };
- class_1.prototype.isHidden = function () { return false; };
+ class_1.prototype.isHidden = function () { return true; };
class_1.prototype.focus = function () { };
+ class_1.prototype.activate = function () { };
+ class_1.prototype.deactivate = function () { };
return class_1;
}());
var DEBUG = false;
@@ -122,10 +124,6 @@ var FilterMultiSelect = /** @class */ (function () {
throw new Error("JQuery target must be a select element.");
}
var select = t;
- var multiple = select.multiple;
- if (!multiple) {
- throw new Error("Select element must have the \"multiple\" attribute.");
- }
var name = select.name;
if (!name) {
throw new Error("Select element must have a name attribute.");
@@ -133,7 +131,18 @@ var FilterMultiSelect = /** @class */ (function () {
this.name = name;
var array = selectTarget.find('option').toArray();
this.options = FilterMultiSelect.createOptions(this, name, array, args.items);
- this.selectAllOption = FilterMultiSelect.createSelectAllOption(this, name, args.selectAllText);
+ // restrict selection
+ this.numSelectedItems = 0;
+ this.maxNumSelectedItems = !select.multiple ? 1 :
+ args.selectionLimit > 0 ? args.selectionLimit :
+ parseInt(select.getAttribute('multiple')) > 0 ? parseInt(select.getAttribute('multiple')) :
+ 0; //magic number
+ var numOptions = this.options.length;
+ var restrictSelection = this.maxNumSelectedItems > 0 && this.maxNumSelectedItems < numOptions;
+ this.maxNumSelectedItems = restrictSelection ? this.maxNumSelectedItems : numOptions + 1;
+ this.selectAllOption = restrictSelection ?
+ new FilterMultiSelect.RestrictedSelectAllOption(this, name, args.selectAllText) :
+ new FilterMultiSelect.UnrestrictedSelectAllOption(this, name, args.selectAllText);
// filter box
this.filterInput = document.createElement('input');
this.filterInput.type = 'text';
@@ -161,9 +170,12 @@ var FilterMultiSelect = /** @class */ (function () {
if (!customLabel) {
this.label.hidden = true;
}
+ // selection counter
+ this.selectionCounter = document.createElement('span');
+ this.selectionCounter.hidden = !restrictSelection;
// viewbar
this.viewBar = document.createElement('div');
- this.viewBar.append(this.label, this.placeholder, this.selectedItems);
+ this.viewBar.append(this.label, this.selectionCounter, this.placeholder, this.selectedItems);
this.div = document.createElement('div');
this.div.id = select.id;
this.div.append(this.viewBar, this.dropDown);
@@ -172,7 +184,6 @@ var FilterMultiSelect = /** @class */ (function () {
this.allowEnablingAndDisabling = args.allowEnablingAndDisabling;
this.filterText = '';
this.showing = new Array();
- this.focusable = new Array();
this.itemFocus = -2; //magic number
this.initialize();
}
@@ -208,51 +219,6 @@ var FilterMultiSelect = /** @class */ (function () {
throw new Error("Option " + label + " does not have an associated value.");
}
};
- FilterMultiSelect.createSelectAllOption = function (fms, name, label) {
- return new /** @class */ (function (_super) {
- __extends(class_2, _super);
- function class_2() {
- var _this = _super.call(this, fms, -1, name, label, '', false, false) || this;
- _this.checkbox.indeterminate = false;
- return _this;
- }
- class_2.prototype.markSelectAll = function () {
- this.checkbox.checked = true;
- this.checkbox.indeterminate = false;
- };
- class_2.prototype.markSelectPartial = function () {
- this.checkbox.checked = false;
- this.checkbox.indeterminate = true;
- };
- class_2.prototype.markSelectAllNotDisabled = function () {
- this.checkbox.checked = true;
- this.checkbox.indeterminate = true;
- };
- class_2.prototype.markDeselect = function () {
- this.checkbox.checked = false;
- this.checkbox.indeterminate = false;
- };
- class_2.prototype.select = function () {
- if (this.isDisabled())
- return;
- this.fms.options.filter(function (o) { return !o.isSelected(); })
- .forEach(function (o) { return o.select(); });
- };
- class_2.prototype.deselect = function () {
- if (this.isDisabled())
- return;
- this.fms.options.filter(function (o) { return o.isSelected(); })
- .forEach(function (o) { return o.deselect(); });
- };
- class_2.prototype.enable = function () {
- this.checkbox.disabled = false;
- };
- class_2.prototype.disable = function () {
- this.checkbox.disabled = true;
- };
- return class_2;
- }(FilterMultiSelect.SingleOption))();
- };
FilterMultiSelect.createEvent = function (e, n, v, l) {
var event = new CustomEvent(e, {
detail: {
@@ -278,6 +244,7 @@ var FilterMultiSelect = /** @class */ (function () {
this.selectedItems.className = 'selected-items';
this.viewBar.className = 'viewbar form-control dropdown-toggle';
this.label.className = 'col-form-label mr-2 text-dark';
+ this.selectionCounter.className = 'mr-2';
this.div.className = 'filter-multi-select dropdown';
if (this.isDisabled()) {
this.disableNoPermissionCheck();
@@ -350,15 +317,11 @@ var FilterMultiSelect = /** @class */ (function () {
this.selectAllOption.show();
}
var showing = new Array();
- var focusable = new Array();
if (this.caseSensitive) {
this.options.forEach(function (o, i) {
if (o.getLabel().indexOf(text) !== -1) { //magic number
o.show();
showing.push(i);
- if (!o.isDisabled()) {
- focusable.push(i);
- }
}
else {
o.hide();
@@ -370,9 +333,6 @@ var FilterMultiSelect = /** @class */ (function () {
if (o.getLabel().toLowerCase().indexOf(text.toLowerCase()) !== -1) { //magic number
o.show();
showing.push(i);
- if (!o.isDisabled()) {
- focusable.push(i);
- }
}
else {
o.hide();
@@ -381,7 +341,6 @@ var FilterMultiSelect = /** @class */ (function () {
}
this.filterText = text;
this.showing = showing;
- this.focusable = focusable;
};
FilterMultiSelect.prototype.clearFilterAndRefocus = function () {
if (DEBUG) {
@@ -443,19 +402,30 @@ var FilterMultiSelect = /** @class */ (function () {
this.div.addEventListener('focus', this.fmsFocusListener);
};
FilterMultiSelect.prototype.incrementItemFocus = function () {
- if (this.itemFocus >= this.focusable.length - 1 || this.focusable.length == 0)
+ if (this.itemFocus >= this.options.length - 1)
return;
- this.itemFocus++;
- if (this.itemFocus == -1 && this.selectAllOption.isHidden()) { //magic number
- this.itemFocus++;
+ var i = this.itemFocus;
+ do {
+ i++;
+ } while ((i == -1 && (this.selectAllOption.isDisabled() || this.selectAllOption.isHidden())) || //magic number
+ (i >= 0 && i < this.options.length && (this.options[i].isDisabled() || this.options[i].isHidden())));
+ this.itemFocus = i > this.options.length - 1 ? this.itemFocus : i;
+ if (DEBUG) {
+ console.log("item focus: " + this.itemFocus);
}
};
FilterMultiSelect.prototype.decrementItemFocus = function () {
if (this.itemFocus <= -2)
return; //magic number
- this.itemFocus--;
- if (this.itemFocus == -1 && this.selectAllOption.isHidden()) { //magic number
- this.itemFocus--;
+ var i = this.itemFocus;
+ do {
+ i--;
+ } while ((i == -1 && (this.selectAllOption.isDisabled() || this.selectAllOption.isHidden())) ||
+ (i >= 0 && (this.options[i].isDisabled() || this.options[i].isHidden())) &&
+ i > -2); //magic number
+ this.itemFocus = i;
+ if (DEBUG) {
+ console.log("item focus: " + this.itemFocus);
}
};
FilterMultiSelect.prototype.focusItem = function () {
@@ -466,7 +436,7 @@ var FilterMultiSelect = /** @class */ (function () {
this.selectAllOption.focus();
}
else {
- this.options[this.focusable[this.itemFocus]].focus();
+ this.options[this.itemFocus].focus();
}
};
FilterMultiSelect.prototype.openDropdown = function () {
@@ -486,11 +456,13 @@ var FilterMultiSelect = /** @class */ (function () {
FilterMultiSelect.prototype.queueOption = function (option) {
if (this.options.indexOf(option) == -1)
return;
+ this.numSelectedItems++;
$(this.selectedItems).append(option.getSelectedItemBadge());
};
FilterMultiSelect.prototype.unqueueOption = function (option) {
if (this.options.indexOf(option) == -1)
return;
+ this.numSelectedItems--;
$(this.selectedItems).children('[data-id="' + option.getSelectedItemBadge().getAttribute('data-id') + '"]').remove();
};
FilterMultiSelect.prototype.update = function () {
@@ -518,6 +490,17 @@ var FilterMultiSelect = /** @class */ (function () {
else {
this.selectAllOption.enable();
}
+ if (!this.canSelect()) {
+ this.options
+ .filter(function (o) { return !o.isSelected(); })
+ .forEach(function (o) { return o.deactivate(); });
+ }
+ else {
+ this.options
+ .filter(function (o) { return !o.isSelected(); })
+ .forEach(function (o) { return o.activate(); });
+ }
+ this.updateSelectionCounter();
};
FilterMultiSelect.prototype.areAllSelected = function () {
return this.options
@@ -559,18 +542,26 @@ var FilterMultiSelect = /** @class */ (function () {
return NULL_OPTION;
};
FilterMultiSelect.prototype.selectOption = function (value) {
+ if (this.isDisabled())
+ return;
this.getOption(value).select();
};
FilterMultiSelect.prototype.deselectOption = function (value) {
+ if (this.isDisabled())
+ return;
this.getOption(value).deselect();
};
FilterMultiSelect.prototype.isOptionSelected = function (value) {
return this.getOption(value).isSelected();
};
FilterMultiSelect.prototype.enableOption = function (value) {
+ if (!this.isEnablingAndDisablingPermitted())
+ return;
this.getOption(value).enable();
};
FilterMultiSelect.prototype.disableOption = function (value) {
+ if (!this.isEnablingAndDisablingPermitted())
+ return;
this.getOption(value).disable();
};
FilterMultiSelect.prototype.isOptionDisabled = function (value) {
@@ -613,9 +604,13 @@ var FilterMultiSelect = /** @class */ (function () {
return this.disabled;
};
FilterMultiSelect.prototype.selectAll = function () {
+ if (this.isDisabled())
+ return;
this.selectAllOption.select();
};
FilterMultiSelect.prototype.deselectAll = function () {
+ if (this.isDisabled())
+ return;
this.selectAllOption.deselect();
};
FilterMultiSelect.prototype.getSelectedOptions = function (includeDisabled) {
@@ -654,8 +649,14 @@ var FilterMultiSelect = /** @class */ (function () {
var event = FilterMultiSelect.createEvent(eventType, this.getName(), value, label);
this.viewBar.dispatchEvent(event);
};
+ FilterMultiSelect.prototype.canSelect = function () {
+ return this.numSelectedItems < this.maxNumSelectedItems;
+ };
+ FilterMultiSelect.prototype.updateSelectionCounter = function () {
+ this.selectionCounter.textContent = this.numSelectedItems + "/" + this.maxNumSelectedItems;
+ };
FilterMultiSelect.SingleOption = /** @class */ (function () {
- function class_3(fms, row, name, label, value, checked, disabled) {
+ function class_2(fms, row, name, label, value, checked, disabled) {
this.fms = fms;
this.div = document.createElement('div');
this.checkbox = document.createElement('input');
@@ -665,7 +666,8 @@ var FilterMultiSelect = /** @class */ (function () {
this.checkbox.id = nchbx;
this.checkbox.name = name;
this.checkbox.value = value;
- this.checkbox.checked = checked;
+ this.initiallyChecked = checked;
+ this.checkbox.checked = false;
this.checkbox.disabled = disabled;
this.labelFor = document.createElement('label');
this.labelFor.htmlFor = nchbx;
@@ -678,24 +680,27 @@ var FilterMultiSelect = /** @class */ (function () {
this.selectedItemBadge.setAttribute('data-id', id);
this.selectedItemBadge.textContent = label;
this.selectedItemBadge.append(this.closeButton);
+ this.disabled = disabled;
+ this.active = true;
}
- class_3.prototype.log = function (m, e) {
+ class_2.prototype.log = function (m, e) {
if (DEBUG) {
console.log(e.timeStamp + " - " + m + ":" + e.type + ":" + e.target);
}
};
- class_3.prototype.initialize = function () {
+ class_2.prototype.initialize = function () {
var _this = this;
this.div.className = 'dropdown-item custom-control';
this.checkbox.className = 'custom-control-input custom-checkbox';
this.labelFor.className = 'custom-control-label';
this.selectedItemBadge.className = 'item';
- if (this.isSelected()) {
+ if (this.initiallyChecked) {
this.selectNoDisabledCheck();
}
- if (this.isDisabled()) {
- this.disableNoPermissionCheck();
+ if (this.disabled) {
+ this.setDisabledViewState();
}
+ this.fms.update();
this.checkbox.addEventListener('change', function (e) {
e.stopPropagation();
if (_this.isDisabled() || _this.fms.isDisabled()) {
@@ -744,18 +749,20 @@ var FilterMultiSelect = /** @class */ (function () {
this.checkbox.tabIndex = -1;
this.closeButton.tabIndex = -1;
};
- class_3.prototype.select = function () {
+ class_2.prototype.select = function () {
if (this.isDisabled())
return;
this.selectNoDisabledCheck();
+ this.fms.update();
};
- class_3.prototype.selectNoDisabledCheck = function () {
+ class_2.prototype.selectNoDisabledCheck = function () {
+ if (!this.fms.canSelect() || !this.isActive())
+ return;
this.checkbox.checked = true;
this.fms.queueOption(this);
this.fms.dispatchSelectedEvent(this);
- this.fms.update();
};
- class_3.prototype.deselect = function () {
+ class_2.prototype.deselect = function () {
if (this.isDisabled())
return;
this.checkbox.checked = false;
@@ -763,54 +770,142 @@ var FilterMultiSelect = /** @class */ (function () {
this.fms.dispatchDeselectedEvent(this);
this.fms.update();
};
- class_3.prototype.enable = function () {
- if (!this.fms.isEnablingAndDisablingPermitted())
- return;
+ class_2.prototype.enable = function () {
+ this.disabled = false;
+ this.setEnabledViewState();
+ this.fms.update();
+ };
+ class_2.prototype.setEnabledViewState = function () {
this.checkbox.disabled = false;
this.selectedItemBadge.classList.remove('disabled');
- this.fms.update();
};
- class_3.prototype.disable = function () {
- if (!this.fms.isEnablingAndDisablingPermitted())
- return;
- this.disableNoPermissionCheck();
+ class_2.prototype.disable = function () {
+ this.disabled = true;
+ this.setDisabledViewState();
+ this.fms.update();
};
- class_3.prototype.disableNoPermissionCheck = function () {
+ class_2.prototype.setDisabledViewState = function () {
this.checkbox.disabled = true;
this.selectedItemBadge.classList.add('disabled');
- this.fms.update();
};
- class_3.prototype.isSelected = function () {
+ class_2.prototype.isSelected = function () {
return this.checkbox.checked;
};
- class_3.prototype.isDisabled = function () {
+ class_2.prototype.isDisabled = function () {
return this.checkbox.disabled;
};
- class_3.prototype.getListItem = function () {
+ class_2.prototype.getListItem = function () {
return this.div;
};
- class_3.prototype.getSelectedItemBadge = function () {
+ class_2.prototype.getSelectedItemBadge = function () {
return this.selectedItemBadge;
};
- class_3.prototype.getLabel = function () {
+ class_2.prototype.getLabel = function () {
return this.labelFor.textContent;
};
- class_3.prototype.getValue = function () {
+ class_2.prototype.getValue = function () {
return this.checkbox.value;
};
- class_3.prototype.show = function () {
+ class_2.prototype.show = function () {
this.div.hidden = false;
};
- class_3.prototype.hide = function () {
+ class_2.prototype.hide = function () {
this.div.hidden = true;
};
- class_3.prototype.isHidden = function () {
+ class_2.prototype.isHidden = function () {
return this.div.hidden;
};
- class_3.prototype.focus = function () {
+ class_2.prototype.focus = function () {
this.labelFor.focus();
};
+ class_2.prototype.isActive = function () {
+ return this.active;
+ };
+ class_2.prototype.activate = function () {
+ this.active = true;
+ if (!this.disabled) {
+ this.setEnabledViewState();
+ }
+ };
+ class_2.prototype.deactivate = function () {
+ this.active = false;
+ this.setDisabledViewState();
+ };
+ return class_2;
+ }());
+ FilterMultiSelect.UnrestrictedSelectAllOption = /** @class */ (function (_super) {
+ __extends(class_3, _super);
+ function class_3(fms, name, label) {
+ var _this = _super.call(this, fms, -1, name, label, '', false, false) || this;
+ _this.checkbox.indeterminate = false;
+ return _this;
+ }
+ class_3.prototype.markSelectAll = function () {
+ this.checkbox.checked = true;
+ this.checkbox.indeterminate = false;
+ };
+ class_3.prototype.markSelectPartial = function () {
+ this.checkbox.checked = false;
+ this.checkbox.indeterminate = true;
+ };
+ class_3.prototype.markSelectAllNotDisabled = function () {
+ this.checkbox.checked = true;
+ this.checkbox.indeterminate = true;
+ };
+ class_3.prototype.markDeselect = function () {
+ this.checkbox.checked = false;
+ this.checkbox.indeterminate = false;
+ };
+ class_3.prototype.select = function () {
+ if (this.isDisabled())
+ return;
+ this.fms.options.filter(function (o) { return !o.isSelected(); })
+ .forEach(function (o) { return o.select(); });
+ this.fms.update();
+ };
+ class_3.prototype.deselect = function () {
+ if (this.isDisabled())
+ return;
+ this.fms.options.filter(function (o) { return o.isSelected(); })
+ .forEach(function (o) { return o.deselect(); });
+ this.fms.update();
+ };
+ class_3.prototype.enable = function () {
+ this.disabled = false;
+ this.checkbox.disabled = false;
+ };
+ class_3.prototype.disable = function () {
+ this.disabled = true;
+ this.checkbox.disabled = true;
+ };
return class_3;
+ }(FilterMultiSelect.SingleOption));
+ FilterMultiSelect.RestrictedSelectAllOption = /** @class */ (function () {
+ function class_4(fms, name, label) {
+ this.usao = new FilterMultiSelect.UnrestrictedSelectAllOption(fms, name, label);
+ }
+ class_4.prototype.initialize = function () { this.usao.initialize(); };
+ class_4.prototype.select = function () { };
+ class_4.prototype.deselect = function () { this.usao.deselect(); };
+ class_4.prototype.enable = function () { };
+ class_4.prototype.disable = function () { };
+ class_4.prototype.isSelected = function () { return false; };
+ class_4.prototype.isDisabled = function () { return true; };
+ class_4.prototype.getListItem = function () { return document.createElement('div'); };
+ class_4.prototype.getSelectedItemBadge = function () { return document.createElement('div'); };
+ class_4.prototype.getLabel = function () { return 'RESTRICTED_SELECT_ALL_OPTION'; };
+ class_4.prototype.getValue = function () { return 'RESTRICTED_SELECT_ALL_OPTION'; };
+ class_4.prototype.show = function () { };
+ class_4.prototype.hide = function () { };
+ class_4.prototype.isHidden = function () { return true; };
+ class_4.prototype.focus = function () { };
+ class_4.prototype.markSelectAll = function () { };
+ class_4.prototype.markSelectPartial = function () { };
+ class_4.prototype.markSelectAllNotDisabled = function () { };
+ class_4.prototype.markDeselect = function () { };
+ class_4.prototype.activate = function () { };
+ class_4.prototype.deactivate = function () { };
+ return class_4;
}());
FilterMultiSelect.EventType = {
SELECTED: "optionselected",
diff --git a/dist/FilterMultiSelect.js.map b/dist/FilterMultiSelect.js.map
index b65d0c2..eecd463 100644
--- a/dist/FilterMultiSelect.js.map
+++ b/dist/FilterMultiSelect.js.map
@@ -1 +1 @@
-{"version":3,"file":"FilterMultiSelect.js","sourceRoot":"","sources":["../src/FilterMultiSelect.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,CAAU,MAAM,QAAQ,CAAC;AAEhC,IAAM,WAAW,GAAG;IAAI;IAgBxB,CAAC;IAfU,4BAAU,GAAjB,cAA2B,CAAC;IACrB,wBAAM,GAAb,cAAuB,CAAC;IACjB,0BAAQ,GAAf,cAAyB,CAAC;IACnB,wBAAM,GAAb,cA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AC,CAAA,CAAC;QACxC,wBAAM,GAAN,cAAgB,CAAC;QACjB,yBAAO,GAAP,cAAiB,CAAC;QAClB,4BAAU,GAAV,cAAuB,OAAO,KAAK,CAAC,CAAA,CAAC;QACrC,4BAAU,GAAV,cAAuB,OAAO,IAAI,CAAC,CAAA,CAAC;QACpC,6BAAW,GAAX,cAA4B,OAAO,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA,CAAC;QAClE,sCAAoB,GAApB,cAAqC,OAAO,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAA,CAAC;QAC3E,0BAAQ,GAAR,cAAoB,OAAO,8BAA8B,CAAA,CAAA,CAAC;QAC1D,0BAAQ,GAAR,cAAoB,OAAO,8BAA8B,CAAA,CAAA,CAAC;QAC1D,sBAAI,GAAJ,cAAc,CAAC;QACf,sBAAI,GAAJ,cAAc,CAAC;QACf,0BAAQ,GAAR,cAAqB,OAAO,IAAI,CAAC,CAAA,CAAC;QAClC,uBAAK,GAAL,cAAe,CAAC;QAChB,+BAAa,GAAb,cAAuB,CAAC;QACxB,mCAAiB,GAAjB,cAA2B,CAAC;QAC5B,0CAAwB,GAAxB,cAAkC,CAAC;QACnC,8BAAY,GAAZ,cAAsB,CAAC;QACvB,0BAAQ,GAAR,cAAkB,CAAC;QACnB,4BAAU,GAAV,cAAoB,CAAC;QACzB,cAAC;IAAD,CAAC,AA5B0C,IA4B1C;IAEa,2BAAS,GAAG;QACtB,QAAQ,EAAE,gBAAgB;QAC1B,UAAU,EAAE,kBAAkB;KACxB,CAAC;IAwnBf,wBAAC;CAAA,AA77BD,IA67BC;eA77BoB,iBAAiB"}
\ No newline at end of file
diff --git a/dist/example.html b/dist/example.html
index ff9abe2..5afd644 100644
--- a/dist/example.html
+++ b/dist/example.html
@@ -79,7 +79,7 @@
Default Dropdown
Dropdown with pre-sets and case-sensitive filtering
-
+
+
+
Single Select
+
+
+
+
+
+
+
+
+
Limit Selection Count
+
+
+
+
+
+
+
@@ -273,6 +306,10 @@
Dropdown with items added via js
["Berlin","d",true,true],
],
});
+ var colors = $('#colors').filterMultiSelect();
+ var trees = $('#trees').filterMultiSelect({
+ selectionLimit: 3,
+ });
$('#jsonbtn1').click((e) => {
var b = true;
$('#jsonresult1').text(JSON.stringify(getJson(b),null," "));
diff --git a/dist/filter-multi-select-bundle.js b/dist/filter-multi-select-bundle.js
index fb3b837..d5cf123 100644
--- a/dist/filter-multi-select-bundle.js
+++ b/dist/filter-multi-select-bundle.js
@@ -48,7 +48,7 @@
};
class_1.prototype.isDisabled = function () {
- return false;
+ return true;
};
class_1.prototype.getListItem = function () {
@@ -72,11 +72,15 @@
class_1.prototype.hide = function () {};
class_1.prototype.isHidden = function () {
- return false;
+ return true;
};
class_1.prototype.focus = function () {};
+ class_1.prototype.activate = function () {};
+
+ class_1.prototype.deactivate = function () {};
+
return class_1;
}())();
@@ -158,12 +162,6 @@
}
var select = t;
- var multiple = select.multiple;
-
- if (!multiple) {
- throw new Error("Select element must have the \"multiple\" attribute.");
- }
-
var name = select.name;
if (!name) {
@@ -172,8 +170,15 @@
this.name = name;
var array = selectTarget.find('option').toArray();
- this.options = FilterMultiSelect.createOptions(this, name, array, args.items);
- this.selectAllOption = FilterMultiSelect.createSelectAllOption(this, name, args.selectAllText); // filter box
+ this.options = FilterMultiSelect.createOptions(this, name, array, args.items); // restrict selection
+
+ this.numSelectedItems = 0;
+ this.maxNumSelectedItems = !select.multiple ? 1 : args.selectionLimit > 0 ? args.selectionLimit : parseInt(select.getAttribute('multiple')) > 0 ? parseInt(select.getAttribute('multiple')) : 0; //magic number
+
+ var numOptions = this.options.length;
+ var restrictSelection = this.maxNumSelectedItems > 0 && this.maxNumSelectedItems < numOptions;
+ this.maxNumSelectedItems = restrictSelection ? this.maxNumSelectedItems : numOptions + 1;
+ this.selectAllOption = restrictSelection ? new FilterMultiSelect.RestrictedSelectAllOption(this, name, args.selectAllText) : new FilterMultiSelect.UnrestrictedSelectAllOption(this, name, args.selectAllText); // filter box
this.filterInput = document.createElement('input');
this.filterInput.type = 'text';
@@ -203,11 +208,14 @@
if (!customLabel) {
this.label.hidden = true;
- } // viewbar
+ } // selection counter
+ this.selectionCounter = document.createElement('span');
+ this.selectionCounter.hidden = !restrictSelection; // viewbar
+
this.viewBar = document.createElement('div');
- this.viewBar.append(this.label, this.placeholder, this.selectedItems);
+ this.viewBar.append(this.label, this.selectionCounter, this.placeholder, this.selectedItems);
this.div = document.createElement('div');
this.div.id = select.id;
this.div.append(this.viewBar, this.dropDown);
@@ -216,7 +224,6 @@
this.allowEnablingAndDisabling = args.allowEnablingAndDisabling;
this.filterText = '';
this.showing = new Array();
- this.focusable = new Array();
this.itemFocus = -2; //magic number
this.initialize();
@@ -256,69 +263,6 @@
}
};
- FilterMultiSelect.createSelectAllOption = function (fms, name, label) {
- return new (
- /** @class */
- function (_super) {
- __extends(class_2, _super);
-
- function class_2() {
- var _this = _super.call(this, fms, -1, name, label, '', false, false) || this;
-
- _this.checkbox.indeterminate = false;
- return _this;
- }
-
- class_2.prototype.markSelectAll = function () {
- this.checkbox.checked = true;
- this.checkbox.indeterminate = false;
- };
-
- class_2.prototype.markSelectPartial = function () {
- this.checkbox.checked = false;
- this.checkbox.indeterminate = true;
- };
-
- class_2.prototype.markSelectAllNotDisabled = function () {
- this.checkbox.checked = true;
- this.checkbox.indeterminate = true;
- };
-
- class_2.prototype.markDeselect = function () {
- this.checkbox.checked = false;
- this.checkbox.indeterminate = false;
- };
-
- class_2.prototype.select = function () {
- if (this.isDisabled()) return;
- this.fms.options.filter(function (o) {
- return !o.isSelected();
- }).forEach(function (o) {
- return o.select();
- });
- };
-
- class_2.prototype.deselect = function () {
- if (this.isDisabled()) return;
- this.fms.options.filter(function (o) {
- return o.isSelected();
- }).forEach(function (o) {
- return o.deselect();
- });
- };
-
- class_2.prototype.enable = function () {
- this.checkbox.disabled = false;
- };
-
- class_2.prototype.disable = function () {
- this.checkbox.disabled = true;
- };
-
- return class_2;
- }(FilterMultiSelect.SingleOption))();
- };
-
FilterMultiSelect.createEvent = function (e, n, v, l) {
var event = new CustomEvent(e, {
detail: {
@@ -347,6 +291,7 @@
this.selectedItems.className = 'selected-items';
this.viewBar.className = 'viewbar form-control dropdown-toggle';
this.label.className = 'col-form-label mr-2 text-dark';
+ this.selectionCounter.className = 'mr-2';
this.div.className = 'filter-multi-select dropdown';
if (this.isDisabled()) {
@@ -423,7 +368,6 @@
}
var showing = new Array();
- var focusable = new Array();
if (this.caseSensitive) {
this.options.forEach(function (o, i) {
@@ -431,10 +375,6 @@
//magic number
o.show();
showing.push(i);
-
- if (!o.isDisabled()) {
- focusable.push(i);
- }
} else {
o.hide();
}
@@ -445,10 +385,6 @@
//magic number
o.show();
showing.push(i);
-
- if (!o.isDisabled()) {
- focusable.push(i);
- }
} else {
o.hide();
}
@@ -457,7 +393,6 @@
this.filterText = text;
this.showing = showing;
- this.focusable = focusable;
};
FilterMultiSelect.prototype.clearFilterAndRefocus = function () {
@@ -517,24 +452,28 @@
};
FilterMultiSelect.prototype.incrementItemFocus = function () {
- if (this.itemFocus >= this.focusable.length - 1 || this.focusable.length == 0) return;
- this.itemFocus++;
+ if (this.itemFocus >= this.options.length - 1) return;
+ var i = this.itemFocus;
- if (this.itemFocus == -1 && this.selectAllOption.isHidden()) {
- //magic number
- this.itemFocus++;
- }
+ do {
+ i++;
+ } while (i == -1 && (this.selectAllOption.isDisabled() || this.selectAllOption.isHidden()) || //magic number
+ i >= 0 && i < this.options.length && (this.options[i].isDisabled() || this.options[i].isHidden()));
+
+ this.itemFocus = i > this.options.length - 1 ? this.itemFocus : i;
};
FilterMultiSelect.prototype.decrementItemFocus = function () {
if (this.itemFocus <= -2) return; //magic number
- this.itemFocus--;
+ var i = this.itemFocus;
- if (this.itemFocus == -1 && this.selectAllOption.isHidden()) {
- //magic number
- this.itemFocus--;
- }
+ do {
+ i--;
+ } while (i == -1 && (this.selectAllOption.isDisabled() || this.selectAllOption.isHidden()) || i >= 0 && (this.options[i].isDisabled() || this.options[i].isHidden()) && i > -2); //magic number
+
+
+ this.itemFocus = i;
};
FilterMultiSelect.prototype.focusItem = function () {
@@ -543,7 +482,7 @@
} else if (this.itemFocus === -1) {
this.selectAllOption.focus();
} else {
- this.options[this.focusable[this.itemFocus]].focus();
+ this.options[this.itemFocus].focus();
}
};
@@ -561,11 +500,13 @@
FilterMultiSelect.prototype.queueOption = function (option) {
if (this.options.indexOf(option) == -1) return;
+ this.numSelectedItems++;
$__default['default'](this.selectedItems).append(option.getSelectedItemBadge());
};
FilterMultiSelect.prototype.unqueueOption = function (option) {
if (this.options.indexOf(option) == -1) return;
+ this.numSelectedItems--;
$__default['default'](this.selectedItems).children('[data-id="' + option.getSelectedItemBadge().getAttribute('data-id') + '"]').remove();
};
@@ -591,6 +532,22 @@
} else {
this.selectAllOption.enable();
}
+
+ if (!this.canSelect()) {
+ this.options.filter(function (o) {
+ return !o.isSelected();
+ }).forEach(function (o) {
+ return o.deactivate();
+ });
+ } else {
+ this.options.filter(function (o) {
+ return !o.isSelected();
+ }).forEach(function (o) {
+ return o.activate();
+ });
+ }
+
+ this.updateSelectionCounter();
};
FilterMultiSelect.prototype.areAllSelected = function () {
@@ -652,10 +609,12 @@
};
FilterMultiSelect.prototype.selectOption = function (value) {
+ if (this.isDisabled()) return;
this.getOption(value).select();
};
FilterMultiSelect.prototype.deselectOption = function (value) {
+ if (this.isDisabled()) return;
this.getOption(value).deselect();
};
@@ -664,10 +623,12 @@
};
FilterMultiSelect.prototype.enableOption = function (value) {
+ if (!this.isEnablingAndDisablingPermitted()) return;
this.getOption(value).enable();
};
FilterMultiSelect.prototype.disableOption = function (value) {
+ if (!this.isEnablingAndDisablingPermitted()) return;
this.getOption(value).disable();
};
@@ -720,10 +681,12 @@
};
FilterMultiSelect.prototype.selectAll = function () {
+ if (this.isDisabled()) return;
this.selectAllOption.select();
};
FilterMultiSelect.prototype.deselectAll = function () {
+ if (this.isDisabled()) return;
this.selectAllOption.deselect();
};
@@ -782,10 +745,18 @@
this.viewBar.dispatchEvent(event);
};
+ FilterMultiSelect.prototype.canSelect = function () {
+ return this.numSelectedItems < this.maxNumSelectedItems;
+ };
+
+ FilterMultiSelect.prototype.updateSelectionCounter = function () {
+ this.selectionCounter.textContent = this.numSelectedItems + "/" + this.maxNumSelectedItems;
+ };
+
FilterMultiSelect.SingleOption =
/** @class */
function () {
- function class_3(fms, row, name, label, value, checked, disabled) {
+ function class_2(fms, row, name, label, value, checked, disabled) {
this.fms = fms;
this.div = document.createElement('div');
this.checkbox = document.createElement('input');
@@ -795,7 +766,8 @@
this.checkbox.id = nchbx;
this.checkbox.name = name;
this.checkbox.value = value;
- this.checkbox.checked = checked;
+ this.initiallyChecked = checked;
+ this.checkbox.checked = false;
this.checkbox.disabled = disabled;
this.labelFor = document.createElement('label');
this.labelFor.htmlFor = nchbx;
@@ -808,12 +780,14 @@
this.selectedItemBadge.setAttribute('data-id', id);
this.selectedItemBadge.textContent = label;
this.selectedItemBadge.append(this.closeButton);
+ this.disabled = disabled;
+ this.active = true;
}
- class_3.prototype.log = function (m, e) {
+ class_2.prototype.log = function (m, e) {
};
- class_3.prototype.initialize = function () {
+ class_2.prototype.initialize = function () {
var _this = this;
this.div.className = 'dropdown-item custom-control';
@@ -821,14 +795,15 @@
this.labelFor.className = 'custom-control-label';
this.selectedItemBadge.className = 'item';
- if (this.isSelected()) {
+ if (this.initiallyChecked) {
this.selectNoDisabledCheck();
}
- if (this.isDisabled()) {
- this.disableNoPermissionCheck();
+ if (this.disabled) {
+ this.setDisabledViewState();
}
+ this.fms.update();
this.checkbox.addEventListener('change', function (e) {
e.stopPropagation();
@@ -874,19 +849,20 @@
this.closeButton.tabIndex = -1;
};
- class_3.prototype.select = function () {
+ class_2.prototype.select = function () {
if (this.isDisabled()) return;
this.selectNoDisabledCheck();
+ this.fms.update();
};
- class_3.prototype.selectNoDisabledCheck = function () {
+ class_2.prototype.selectNoDisabledCheck = function () {
+ if (!this.fms.canSelect() || !this.isActive()) return;
this.checkbox.checked = true;
this.fms.queueOption(this);
this.fms.dispatchSelectedEvent(this);
- this.fms.update();
};
- class_3.prototype.deselect = function () {
+ class_2.prototype.deselect = function () {
if (this.isDisabled()) return;
this.checkbox.checked = false;
this.fms.unqueueOption(this);
@@ -894,65 +870,221 @@
this.fms.update();
};
- class_3.prototype.enable = function () {
- if (!this.fms.isEnablingAndDisablingPermitted()) return;
+ class_2.prototype.enable = function () {
+ this.disabled = false;
+ this.setEnabledViewState();
+ this.fms.update();
+ };
+
+ class_2.prototype.setEnabledViewState = function () {
this.checkbox.disabled = false;
this.selectedItemBadge.classList.remove('disabled');
- this.fms.update();
};
- class_3.prototype.disable = function () {
- if (!this.fms.isEnablingAndDisablingPermitted()) return;
- this.disableNoPermissionCheck();
+ class_2.prototype.disable = function () {
+ this.disabled = true;
+ this.setDisabledViewState();
+ this.fms.update();
};
- class_3.prototype.disableNoPermissionCheck = function () {
+ class_2.prototype.setDisabledViewState = function () {
this.checkbox.disabled = true;
this.selectedItemBadge.classList.add('disabled');
- this.fms.update();
};
- class_3.prototype.isSelected = function () {
+ class_2.prototype.isSelected = function () {
return this.checkbox.checked;
};
- class_3.prototype.isDisabled = function () {
+ class_2.prototype.isDisabled = function () {
return this.checkbox.disabled;
};
- class_3.prototype.getListItem = function () {
+ class_2.prototype.getListItem = function () {
return this.div;
};
- class_3.prototype.getSelectedItemBadge = function () {
+ class_2.prototype.getSelectedItemBadge = function () {
return this.selectedItemBadge;
};
- class_3.prototype.getLabel = function () {
+ class_2.prototype.getLabel = function () {
return this.labelFor.textContent;
};
- class_3.prototype.getValue = function () {
+ class_2.prototype.getValue = function () {
return this.checkbox.value;
};
- class_3.prototype.show = function () {
+ class_2.prototype.show = function () {
this.div.hidden = false;
};
- class_3.prototype.hide = function () {
+ class_2.prototype.hide = function () {
this.div.hidden = true;
};
- class_3.prototype.isHidden = function () {
+ class_2.prototype.isHidden = function () {
return this.div.hidden;
};
- class_3.prototype.focus = function () {
+ class_2.prototype.focus = function () {
this.labelFor.focus();
};
+ class_2.prototype.isActive = function () {
+ return this.active;
+ };
+
+ class_2.prototype.activate = function () {
+ this.active = true;
+
+ if (!this.disabled) {
+ this.setEnabledViewState();
+ }
+ };
+
+ class_2.prototype.deactivate = function () {
+ this.active = false;
+ this.setDisabledViewState();
+ };
+
+ return class_2;
+ }();
+
+ FilterMultiSelect.UnrestrictedSelectAllOption =
+ /** @class */
+ function (_super) {
+ __extends(class_3, _super);
+
+ function class_3(fms, name, label) {
+ var _this = _super.call(this, fms, -1, name, label, '', false, false) || this;
+
+ _this.checkbox.indeterminate = false;
+ return _this;
+ }
+
+ class_3.prototype.markSelectAll = function () {
+ this.checkbox.checked = true;
+ this.checkbox.indeterminate = false;
+ };
+
+ class_3.prototype.markSelectPartial = function () {
+ this.checkbox.checked = false;
+ this.checkbox.indeterminate = true;
+ };
+
+ class_3.prototype.markSelectAllNotDisabled = function () {
+ this.checkbox.checked = true;
+ this.checkbox.indeterminate = true;
+ };
+
+ class_3.prototype.markDeselect = function () {
+ this.checkbox.checked = false;
+ this.checkbox.indeterminate = false;
+ };
+
+ class_3.prototype.select = function () {
+ if (this.isDisabled()) return;
+ this.fms.options.filter(function (o) {
+ return !o.isSelected();
+ }).forEach(function (o) {
+ return o.select();
+ });
+ this.fms.update();
+ };
+
+ class_3.prototype.deselect = function () {
+ if (this.isDisabled()) return;
+ this.fms.options.filter(function (o) {
+ return o.isSelected();
+ }).forEach(function (o) {
+ return o.deselect();
+ });
+ this.fms.update();
+ };
+
+ class_3.prototype.enable = function () {
+ this.disabled = false;
+ this.checkbox.disabled = false;
+ };
+
+ class_3.prototype.disable = function () {
+ this.disabled = true;
+ this.checkbox.disabled = true;
+ };
+
return class_3;
+ }(FilterMultiSelect.SingleOption);
+
+ FilterMultiSelect.RestrictedSelectAllOption =
+ /** @class */
+ function () {
+ function class_4(fms, name, label) {
+ this.usao = new FilterMultiSelect.UnrestrictedSelectAllOption(fms, name, label);
+ }
+
+ class_4.prototype.initialize = function () {
+ this.usao.initialize();
+ };
+
+ class_4.prototype.select = function () {};
+
+ class_4.prototype.deselect = function () {
+ this.usao.deselect();
+ };
+
+ class_4.prototype.enable = function () {};
+
+ class_4.prototype.disable = function () {};
+
+ class_4.prototype.isSelected = function () {
+ return false;
+ };
+
+ class_4.prototype.isDisabled = function () {
+ return true;
+ };
+
+ class_4.prototype.getListItem = function () {
+ return document.createElement('div');
+ };
+
+ class_4.prototype.getSelectedItemBadge = function () {
+ return document.createElement('div');
+ };
+
+ class_4.prototype.getLabel = function () {
+ return 'RESTRICTED_SELECT_ALL_OPTION';
+ };
+
+ class_4.prototype.getValue = function () {
+ return 'RESTRICTED_SELECT_ALL_OPTION';
+ };
+
+ class_4.prototype.show = function () {};
+
+ class_4.prototype.hide = function () {};
+
+ class_4.prototype.isHidden = function () {
+ return true;
+ };
+
+ class_4.prototype.focus = function () {};
+
+ class_4.prototype.markSelectAll = function () {};
+
+ class_4.prototype.markSelectPartial = function () {};
+
+ class_4.prototype.markSelectAllNotDisabled = function () {};
+
+ class_4.prototype.markDeselect = function () {};
+
+ class_4.prototype.activate = function () {};
+
+ class_4.prototype.deactivate = function () {};
+
+ return class_4;
}();
FilterMultiSelect.EventType = {
@@ -991,6 +1123,7 @@
if (typeof args.filterText === 'undefined') args.filterText = 'Filter';
if (typeof args.selectAllText === 'undefined') args.selectAllText = 'Select All';
if (typeof args.labelText === 'undefined') args.labelText = '';
+ if (typeof args.selectionLimit === 'undefined') args.selectionLimit = 0;
if (typeof args.caseSensitive === 'undefined') args.caseSensitive = false;
if (typeof args.allowEnablingAndDisabling === 'undefined') args.allowEnablingAndDisabling = true;
if (typeof args.items === 'undefined') args.items = new Array();
diff --git a/dist/filter-multi-select-bundle.js.map b/dist/filter-multi-select-bundle.js.map
index 26df75a..bdf3a8d 100644
--- a/dist/filter-multi-select-bundle.js.map
+++ b/dist/filter-multi-select-bundle.js.map
@@ -1 +1 @@
-{"version":3,"file":"filter-multi-select-bundle.js","sources":["../src/FilterMultiSelect.ts","../src/filter-multi-select.ts"],"sourcesContent":["/*! \n * Multiple select dropdown with filter jQuery plugin.\n * Copyright (C) 2022 Andrew Wagner github.com/andreww1011\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n * \n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n * \n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301\n * USA\n */\nimport $, { map } from 'jquery';\n\nconst NULL_OPTION = new class implements Option {\n public initialize(): void {}\n public select(): void {}\n public deselect(): void {}\n public enable(): void {}\n public disable(): void {}\n public isSelected(): boolean {return false;}\n public isDisabled(): boolean {return false;}\n public getListItem(): HTMLElement {return document.createElement('div');}\n public getSelectedItemBadge(): HTMLElement {return document.createElement('div');}\n public getLabel(): string {return 'NULL_OPTION'}\n public getValue(): string {return 'NULL_OPTION'}\n public show(): void {}\n public hide(): void {}\n public isHidden(): boolean {return false;}\n public focus(): void {}\n} \n\ninterface Option {\n initialize(): void;\n select(): void;\n deselect(): void;\n enable(): void;\n disable(): void;\n isSelected(): boolean;\n isDisabled(): boolean;\n getListItem(): HTMLElement;\n getSelectedItemBadge(): HTMLElement;\n getLabel(): string;\n getValue(): string;\n show(): void;\n hide(): void;\n isHidden(): boolean;\n focus(): void;\n}\n\nconst DEBUG = false;\n\nexport default class FilterMultiSelect {\n\n private static SingleOption = class implements Option {\n protected div: HTMLDivElement;\n protected checkbox: HTMLInputElement;\n protected labelFor: HTMLLabelElement;\n protected closeButton: HTMLButtonElement;\n protected selectedItemBadge: HTMLSpanElement;\n protected fms: FilterMultiSelect;\n \n constructor(fms: FilterMultiSelect, row: number, name:string, label: string, value: string, checked: boolean, disabled: boolean) {\n this.fms = fms;\n this.div = document.createElement('div');\n this.checkbox = document.createElement('input');\n this.checkbox.type = 'checkbox';\n let id: string = name + '-' + row.toString();\n let nchbx: string = id + '-chbx';\n this.checkbox.id = nchbx;\n this.checkbox.name = name;\n this.checkbox.value = value;\n this.checkbox.checked = checked;\n this.checkbox.disabled = disabled;\n this.labelFor = document.createElement('label');\n this.labelFor.htmlFor = nchbx;\n this.labelFor.textContent = label;\n this.div.append(this.checkbox, this.labelFor);\n this.closeButton = document.createElement('button');\n this.closeButton.type = 'button';\n this.closeButton.innerHTML = '×';\n this.selectedItemBadge = document.createElement('span');\n this.selectedItemBadge.setAttribute('data-id',id);\n this.selectedItemBadge.textContent = label;\n this.selectedItemBadge.append(this.closeButton);\n }\n \n private log(m: string, e: Event):void {\n if (DEBUG) {\n console.log(e.timeStamp + \" - \" + m + \":\" + e.type + \":\" + e.target)\n }\n }\n \n public initialize(): void {\n this.div.className = 'dropdown-item custom-control';\n this.checkbox.className = 'custom-control-input custom-checkbox';\n this.labelFor.className = 'custom-control-label';\n this.selectedItemBadge.className = 'item';\n if (this.isSelected()) {\n this.selectNoDisabledCheck();\n }\n if (this.isDisabled()) {\n this.disableNoPermissionCheck();\n }\n this.checkbox.addEventListener('change', (e: Event) => {\n e.stopPropagation();\n if (this.isDisabled() || this.fms.isDisabled()) {\n e.preventDefault();\n return;\n }\n if (DEBUG) {\n this.log('checkbox',e);\n }\n \n if (this.isSelected()) {\n this.select();\n } else {\n this.deselect();\n }\n let numShown = this.fms.showing.length;\n if (numShown === 1) {\n this.fms.clearFilterAndRefocus();\n }\n }, true);\n this.checkbox.addEventListener('keyup', (e: KeyboardEvent) => {\n if (DEBUG) {\n this.log('checkbox',e);\n }\n switch (e.key) {\n case \"Enter\":\n e.stopPropagation();\n this.checkbox.dispatchEvent(new MouseEvent('click'));\n break;\n default:\n break;\n }\n }, true)\n this.closeButton.addEventListener('click', (e: Event) => {\n e.stopPropagation();\n if (this.isDisabled() || this.fms.isDisabled()) return;\n if (DEBUG) {\n this.log('closeButton',e);\n }\n this.deselect();\n if (!this.fms.isClosed()) {\n this.fms.refocusFilter();\n }\n }, true);\n this.checkbox.tabIndex = -1;\n this.closeButton.tabIndex = -1;\n }\n \n public select(): void {\n if (this.isDisabled()) return;\n this.selectNoDisabledCheck();\n }\n\n private selectNoDisabledCheck(): void {\n this.checkbox.checked = true;\n this.fms.queueOption(this);\n this.fms.dispatchSelectedEvent(this);\n this.fms.update();\n }\n \n public deselect(): void {\n if (this.isDisabled()) return;\n this.checkbox.checked = false;\n this.fms.unqueueOption(this);\n this.fms.dispatchDeselectedEvent(this);\n this.fms.update();\n }\n \n public enable(): void {\n if (!this.fms.isEnablingAndDisablingPermitted()) return;\n this.checkbox.disabled = false;\n this.selectedItemBadge.classList.remove('disabled');\n this.fms.update();\n }\n \n public disable(): void {\n if (!this.fms.isEnablingAndDisablingPermitted()) return;\n this.disableNoPermissionCheck();\n }\n\n private disableNoPermissionCheck(): void {\n this.checkbox.disabled = true;\n this.selectedItemBadge.classList.add('disabled');\n this.fms.update();\n }\n \n public isSelected(): boolean {\n return this.checkbox.checked;\n }\n \n public isDisabled(): boolean {\n return this.checkbox.disabled;\n }\n \n public getListItem(): HTMLElement {\n return this.div;\n }\n \n public getSelectedItemBadge(): HTMLElement {\n return this.selectedItemBadge;\n }\n \n public getLabel(): string {\n return this.labelFor.textContent;\n }\n \n public getValue(): string {\n return this.checkbox.value;\n }\n \n public show(): void {\n this.div.hidden = false;\n }\n \n public hide(): void {\n this.div.hidden = true;\n }\n \n public isHidden(): boolean {\n return this.div.hidden;\n }\n\n public focus(): void {\n this.labelFor.focus();\n }\n }\n\n private static createOptions(fms: FilterMultiSelect, name: string, htmlOptions: Array, jsOptions: Array<[label:string, value:string, selected?:boolean, disabled?:boolean]>): Array
-
+
+
+
Single Select
+
+
+
+
+
+
+
+
+
Limit Selection Count
+
+
+
+
+
+
+
@@ -273,6 +306,10 @@
Dropdown with items added via js
["Berlin","d",true,true],
],
});
+ var colors = $('#colors').filterMultiSelect();
+ var trees = $('#trees').filterMultiSelect({
+ selectionLimit: 3,
+ });
$('#jsonbtn1').click((e) => {
var b = true;
$('#jsonresult1').text(JSON.stringify(getJson(b),null," "));
diff --git a/src/filter-multi-select.ts b/src/filter-multi-select.ts
index 77b78e3..465b1e1 100644
--- a/src/filter-multi-select.ts
+++ b/src/filter-multi-select.ts
@@ -31,6 +31,7 @@ import FilterMultiSelect from './FilterMultiSelect';
if (typeof args.filterText === 'undefined') args.filterText = 'Filter';
if (typeof args.selectAllText === 'undefined') args.selectAllText = 'Select All';
if (typeof args.labelText === 'undefined') args.labelText = '';
+ if (typeof args.selectionLimit === 'undefined') args.selectionLimit = 0;
if (typeof args.caseSensitive === 'undefined') args.caseSensitive = false;
if (typeof args.allowEnablingAndDisabling === 'undefined') args.allowEnablingAndDisabling = true;
if (typeof args.items === 'undefined') args.items = new Array();