@syncfusion/ej2-dropdowns 23.1.40 → 23.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/dist/ej2-dropdowns.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js +2 -2
- package/dist/ej2-dropdowns.umd.min.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es2015.js +45 -4
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +45 -4
- package/dist/es6/ej2-dropdowns.es5.js.map +1 -1
- package/dist/global/ej2-dropdowns.min.js +2 -2
- package/dist/global/ej2-dropdowns.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +7 -7
- package/src/drop-down-base/drop-down-base.d.ts +1 -0
- package/src/drop-down-base/drop-down-base.js +5 -0
- package/src/drop-down-list/drop-down-list.d.ts +3 -0
- package/src/drop-down-list/drop-down-list.js +33 -2
- package/src/drop-down-tree/drop-down-tree.js +2 -2
- package/src/multi-select/multi-select.js +5 -0
- package/styles/auto-complete/bootstrap4.css +13 -2
- package/styles/bootstrap-dark.css +1 -1
- package/styles/bootstrap.css +1 -1
- package/styles/bootstrap4.css +33 -3
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/combo-box/bootstrap4.css +13 -2
- package/styles/drop-down-list/_bootstrap4-definition.scss +13 -2
- package/styles/drop-down-list/bootstrap4.css +13 -2
- package/styles/fabric-dark.css +1 -1
- package/styles/fabric.css +1 -1
- package/styles/fluent-dark.css +1 -1
- package/styles/fluent.css +1 -1
- package/styles/highcontrast-light.css +1 -1
- package/styles/highcontrast.css +1 -1
- package/styles/list-box/_theme.scss +1 -1
- package/styles/list-box/bootstrap-dark.css +1 -1
- package/styles/list-box/bootstrap.css +1 -1
- package/styles/list-box/bootstrap4.css +1 -1
- package/styles/list-box/bootstrap5-dark.css +1 -1
- package/styles/list-box/bootstrap5.css +1 -1
- package/styles/list-box/fabric-dark.css +1 -1
- package/styles/list-box/fabric.css +1 -1
- package/styles/list-box/fluent-dark.css +1 -1
- package/styles/list-box/fluent.css +1 -1
- package/styles/list-box/highcontrast-light.css +1 -1
- package/styles/list-box/highcontrast.css +1 -1
- package/styles/list-box/material-dark.css +1 -1
- package/styles/list-box/material.css +1 -1
- package/styles/list-box/material3-dark.css +1 -1
- package/styles/list-box/material3.css +1 -1
- package/styles/list-box/tailwind-dark.css +1 -1
- package/styles/list-box/tailwind.css +1 -1
- package/styles/material-dark.css +1 -1
- package/styles/material.css +1 -1
- package/styles/material3-dark.css +1 -1
- package/styles/material3.css +1 -1
- package/styles/multi-select/_bootstrap4-definition.scss +19 -0
- package/styles/multi-select/bootstrap4.css +19 -0
- package/styles/tailwind-dark.css +1 -1
- package/styles/tailwind.css +1 -1
|
@@ -1697,6 +1697,11 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1697
1697
|
this.initialize(e);
|
|
1698
1698
|
}
|
|
1699
1699
|
};
|
|
1700
|
+
DropDownBase.prototype.removeScrollEvent = function () {
|
|
1701
|
+
if (this.list) {
|
|
1702
|
+
EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);
|
|
1703
|
+
}
|
|
1704
|
+
};
|
|
1700
1705
|
/**
|
|
1701
1706
|
* Return the module name of this component.
|
|
1702
1707
|
*
|
|
@@ -2094,6 +2099,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
2094
2099
|
_this.pageCount = 0;
|
|
2095
2100
|
_this.isPreventKeyAction = false;
|
|
2096
2101
|
_this.generatedDataObject = {};
|
|
2102
|
+
_this.isTouched = false;
|
|
2097
2103
|
_this.virtualListInfo = {
|
|
2098
2104
|
currentPageNumber: null,
|
|
2099
2105
|
direction: null,
|
|
@@ -3863,7 +3869,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3863
3869
|
this.updateActionCompleteDataValues(ulElement, list);
|
|
3864
3870
|
}
|
|
3865
3871
|
}
|
|
3866
|
-
|
|
3872
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3873
|
+
if ((this.allowCustom || (this.allowFiltering && !this.isValueInList(list, this.value) && this.dataSource instanceof DataManager)) && !this.enableVirtualization) {
|
|
3874
|
+
this.addNewItem(list, selectedItem);
|
|
3875
|
+
}
|
|
3876
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3877
|
+
else if ((this.allowCustom || (this.allowFiltering && this.isValueInList(list, this.value))) && !this.enableVirtualization) {
|
|
3867
3878
|
this.addNewItem(list, selectedItem);
|
|
3868
3879
|
}
|
|
3869
3880
|
if (!isNullOrUndefined(this.itemData) || (isNullOrUndefined(this.itemData) && this.enableVirtualization)) {
|
|
@@ -3897,6 +3908,24 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3897
3908
|
}
|
|
3898
3909
|
};
|
|
3899
3910
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3911
|
+
DropDownList.prototype.isValueInList = function (list, valueToFind) {
|
|
3912
|
+
if (Array.isArray(list)) {
|
|
3913
|
+
for (var i = 0; i < list.length; i++) {
|
|
3914
|
+
if (list[i] === valueToFind) {
|
|
3915
|
+
return true;
|
|
3916
|
+
}
|
|
3917
|
+
}
|
|
3918
|
+
}
|
|
3919
|
+
else if (typeof list === 'object' && list !== null) {
|
|
3920
|
+
for (var key in list) {
|
|
3921
|
+
if (Object.prototype.hasOwnProperty.call(list, key) && list[key] === valueToFind) {
|
|
3922
|
+
return true;
|
|
3923
|
+
}
|
|
3924
|
+
}
|
|
3925
|
+
}
|
|
3926
|
+
return false;
|
|
3927
|
+
};
|
|
3928
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3900
3929
|
DropDownList.prototype.checkFieldValue = function (list, fieldValue) {
|
|
3901
3930
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3902
3931
|
var checkField = list;
|
|
@@ -4661,6 +4690,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4661
4690
|
* @returns {void}
|
|
4662
4691
|
*/
|
|
4663
4692
|
DropDownList.prototype.render = function () {
|
|
4693
|
+
this.preselectedIndex = !isNullOrUndefined(this.index) ? this.index : null;
|
|
4664
4694
|
if (this.element.tagName === 'INPUT') {
|
|
4665
4695
|
this.inputElement = this.element;
|
|
4666
4696
|
if (isNullOrUndefined(this.inputElement.getAttribute('role'))) {
|
|
@@ -4898,7 +4928,6 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4898
4928
|
if (this.allowFiltering && newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource))) {
|
|
4899
4929
|
this.actionCompleteData = { ulElement: null, list: null, isUpdated: false };
|
|
4900
4930
|
this.actionData = this.actionCompleteData;
|
|
4901
|
-
this.itemData = null;
|
|
4902
4931
|
}
|
|
4903
4932
|
else if (this.allowFiltering && newProp.query && !isNullOrUndefined(Object.keys(newProp.query))) {
|
|
4904
4933
|
this.actionCompleteData = this.getModuleName() === 'combobox' ?
|
|
@@ -4944,6 +4973,13 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4944
4973
|
*/
|
|
4945
4974
|
DropDownList.prototype.onPropertyChanged = function (newProp, oldProp) {
|
|
4946
4975
|
var _this = this;
|
|
4976
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4977
|
+
if (!isNullOrUndefined(newProp.dataSource) && !this.isTouched && (isNullOrUndefined(newProp.value) && isNullOrUndefined(newProp.index)) && !isNullOrUndefined(this.preselectedIndex)) {
|
|
4978
|
+
newProp.index = this.preselectedIndex;
|
|
4979
|
+
}
|
|
4980
|
+
if (!isNullOrUndefined(newProp.value) || !isNullOrUndefined(newProp.index)) {
|
|
4981
|
+
this.isTouched = true;
|
|
4982
|
+
}
|
|
4947
4983
|
if (this.getModuleName() === 'dropdownlist') {
|
|
4948
4984
|
this.checkData(newProp);
|
|
4949
4985
|
this.setUpdateInitial(['fields', 'query', 'dataSource'], newProp);
|
|
@@ -7524,12 +7560,12 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
7524
7560
|
var nodes = this.treeObj.element.querySelectorAll('li');
|
|
7525
7561
|
var checkedNodes = this.treeObj.element.querySelectorAll('li .e-checkbox-wrapper[aria-checked=true]');
|
|
7526
7562
|
var wrap = closest(this.checkBoxElement, '.' + CHECKBOXWRAP);
|
|
7527
|
-
if (wrap && args.action === 'uncheck' && (args.isInteracted || checkedNodes.length === 0)) {
|
|
7563
|
+
if (wrap && args.action === 'uncheck' && (args.isInteracted || checkedNodes.length === 0 || args.data[0].isChecked == "false")) {
|
|
7528
7564
|
this.isReverseUpdate = true;
|
|
7529
7565
|
this.changeState(wrap, 'uncheck');
|
|
7530
7566
|
this.isReverseUpdate = false;
|
|
7531
7567
|
}
|
|
7532
|
-
else if (wrap && args.action === 'check' && checkedNodes.length === nodes.length && (args.isInteracted || this.isCheckAllCalled)) {
|
|
7568
|
+
else if (wrap && args.action === 'check' && checkedNodes.length === nodes.length && (args.isInteracted || this.isCheckAllCalled || args.data[0].isChecked == "true")) {
|
|
7533
7569
|
this.isReverseUpdate = true;
|
|
7534
7570
|
this.isCheckAllCalled = false;
|
|
7535
7571
|
this.changeState(wrap, 'check');
|
|
@@ -13956,6 +13992,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13956
13992
|
}
|
|
13957
13993
|
this.updateSelectElementData(this.allowFiltering);
|
|
13958
13994
|
break;
|
|
13995
|
+
case 'fields':
|
|
13996
|
+
if (isNullOrUndefined(this.fields.groupBy)) {
|
|
13997
|
+
this.removeScrollEvent();
|
|
13998
|
+
}
|
|
13999
|
+
break;
|
|
13959
14000
|
default:
|
|
13960
14001
|
{
|
|
13961
14002
|
// eslint-disable-next-line max-len
|