@syncfusion/ej2-dropdowns 30.1.37 → 30.1.39
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/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 +51 -13
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +51 -13
- 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 +5 -5
- package/src/combo-box/combo-box.js +1 -1
- package/src/common/incremental-search.js +1 -1
- package/src/drop-down-list/drop-down-list.d.ts +1 -0
- package/src/drop-down-list/drop-down-list.js +19 -3
- package/src/drop-down-tree/drop-down-tree-model.d.ts +1 -1
- package/src/drop-down-tree/drop-down-tree.d.ts +1 -0
- package/src/drop-down-tree/drop-down-tree.js +9 -1
- package/src/multi-select/multi-select.js +22 -8
- package/styles/bootstrap5-dark-lite.css +1 -1
- package/styles/bootstrap5-dark.css +1 -1
- package/styles/bootstrap5-lite.css +1 -1
- package/styles/bootstrap5.css +1 -1
- package/styles/drop-down-tree/_bootstrap5-definition.scss +1 -1
- package/styles/drop-down-tree/_material3-definition.scss +2 -2
- package/styles/drop-down-tree/bootstrap5-dark.css +1 -1
- package/styles/drop-down-tree/bootstrap5.css +1 -1
- package/styles/drop-down-tree/material3-dark.css +4 -4
- package/styles/drop-down-tree/material3.css +4 -4
- package/styles/material3-dark-lite.css +3 -3
- package/styles/material3-dark.css +4 -4
- package/styles/material3-lite.css +3 -3
- package/styles/material3.css +4 -4
|
@@ -136,7 +136,7 @@ function Search(inputVal, items, searchType, ignoreCase, dataSource, fields, typ
|
|
|
136
136
|
var listItems = items;
|
|
137
137
|
ignoreCase = ignoreCase !== undefined && ignoreCase !== null ? ignoreCase : true;
|
|
138
138
|
var itemData = { item: null, index: null };
|
|
139
|
-
if (inputVal && inputVal.length) {
|
|
139
|
+
if (inputVal && inputVal.length && items) {
|
|
140
140
|
var strLength = inputVal.length;
|
|
141
141
|
var queryStr = ignoreCase ? inputVal.toLocaleLowerCase() : inputVal;
|
|
142
142
|
queryStr = escapeCharRegExp(queryStr);
|
|
@@ -3064,6 +3064,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3064
3064
|
DropDownList.prototype.initializeData = function () {
|
|
3065
3065
|
this.isPopupOpen = false;
|
|
3066
3066
|
this.isDocumentClick = false;
|
|
3067
|
+
this.isPopupRender = false;
|
|
3067
3068
|
this.isInteracted = false;
|
|
3068
3069
|
this.isFilterFocus = false;
|
|
3069
3070
|
this.beforePopupOpen = false;
|
|
@@ -4396,7 +4397,8 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
4396
4397
|
e.preventDefault();
|
|
4397
4398
|
}
|
|
4398
4399
|
if (!this.readonly) {
|
|
4399
|
-
if (this.isPopupOpen)
|
|
4400
|
+
if (this.isPopupOpen || (this.popupObj && document.body.contains(this.popupObj.element) &&
|
|
4401
|
+
this.beforePopupOpen && this.isPopupRender)) {
|
|
4400
4402
|
this.hidePopup(e);
|
|
4401
4403
|
if (this.isFilterLayout()) {
|
|
4402
4404
|
this.focusDropDown(e);
|
|
@@ -5563,8 +5565,19 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5563
5565
|
initialPopupHeight = popupEle.clientHeight;
|
|
5564
5566
|
if (_this.enableVirtualization && (_this.itemTemplate || _this.isAngular)) {
|
|
5565
5567
|
var listitems = popupEle.querySelectorAll('li.e-list-item:not(.e-virtual-list)');
|
|
5566
|
-
|
|
5567
|
-
|
|
5568
|
+
var virtualListitems = popupEle.querySelectorAll('li.e-virtual-list');
|
|
5569
|
+
var listitemsHeight = listitems && listitems.length > 0 ?
|
|
5570
|
+
Math.ceil(listitems[0].getBoundingClientRect().height) +
|
|
5571
|
+
parseInt(window.getComputedStyle(listitems[0]).marginBottom, 10) : 0;
|
|
5572
|
+
var VirtualLiHeight = virtualListitems && virtualListitems.length > 0 ?
|
|
5573
|
+
Math.ceil(virtualListitems[0].getBoundingClientRect().height) +
|
|
5574
|
+
parseInt(window.getComputedStyle(virtualListitems[0]).marginBottom, 10) : 0;
|
|
5575
|
+
if (listitemsHeight !== VirtualLiHeight && virtualListitems && virtualListitems.length > 0) {
|
|
5576
|
+
virtualListitems.forEach(function (item) {
|
|
5577
|
+
item.parentNode.removeChild(item);
|
|
5578
|
+
});
|
|
5579
|
+
}
|
|
5580
|
+
_this.listItemHeight = listitemsHeight;
|
|
5568
5581
|
}
|
|
5569
5582
|
if (_this.enableVirtualization && !_this.list.classList.contains(dropDownBaseClasses.noData)) {
|
|
5570
5583
|
_this.getSkeletonCount();
|
|
@@ -5727,6 +5740,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
5727
5740
|
}
|
|
5728
5741
|
if (!isNullOrUndefined(_this.popupObj)) {
|
|
5729
5742
|
_this.popupObj.show(new Animation(eventArgs.animation), (_this.zIndex === 1000) ? _this.element : null);
|
|
5743
|
+
_this.isPopupRender = true;
|
|
5730
5744
|
}
|
|
5731
5745
|
if (_this.isReact) {
|
|
5732
5746
|
setTimeout(function () {
|
|
@@ -6262,6 +6276,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6262
6276
|
_this.rippleFun();
|
|
6263
6277
|
}
|
|
6264
6278
|
if (_this.isPopupOpen) {
|
|
6279
|
+
_this.isPopupRender = false;
|
|
6265
6280
|
_this.popupObj.hide(new Animation(eventArgs.animation));
|
|
6266
6281
|
}
|
|
6267
6282
|
else {
|
|
@@ -7279,6 +7294,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
7279
7294
|
}
|
|
7280
7295
|
this.hidePopup();
|
|
7281
7296
|
if (this.popupObj) {
|
|
7297
|
+
this.isPopupRender = false;
|
|
7282
7298
|
this.popupObj.hide();
|
|
7283
7299
|
}
|
|
7284
7300
|
this.unWireEvent();
|
|
@@ -9194,6 +9210,7 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9194
9210
|
removeClass([_this.popupEle], DDTHIDEICON);
|
|
9195
9211
|
_this.updatePopupHeight();
|
|
9196
9212
|
_this.popupObj.refreshPosition();
|
|
9213
|
+
_this.checkCollision(_this.popupEle);
|
|
9197
9214
|
if (!(_this.showSelectAll || _this.allowFiltering) && (!_this.popupDiv.classList.contains(NODATA)
|
|
9198
9215
|
&& _this.treeItems.length > 0)) {
|
|
9199
9216
|
var focusedElement = _this.value != null && _this.text != null ? _this.treeObj.element.querySelector('[data-uid="' + _this.value[_this.value.length - 1] + '"]') : null;
|
|
@@ -9237,6 +9254,13 @@ var DropDownTree = /** @__PURE__ @class */ (function (_super) {
|
|
|
9237
9254
|
}
|
|
9238
9255
|
});
|
|
9239
9256
|
};
|
|
9257
|
+
DropDownTree.prototype.checkCollision = function (popupEle) {
|
|
9258
|
+
var collision = isCollide(popupEle);
|
|
9259
|
+
if (collision.length > 0) {
|
|
9260
|
+
popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + 'px';
|
|
9261
|
+
}
|
|
9262
|
+
this.popupObj.resolveCollision();
|
|
9263
|
+
};
|
|
9240
9264
|
DropDownTree.prototype.removeFocus = function (focusedElement, oldFocusedElement) {
|
|
9241
9265
|
if (oldFocusedElement && oldFocusedElement !== focusedElement) {
|
|
9242
9266
|
oldFocusedElement.setAttribute('tabindex', '-1');
|
|
@@ -11970,7 +11994,7 @@ var ComboBox = /** @__PURE__ @class */ (function (_super) {
|
|
|
11970
11994
|
this.removeFillSelection();
|
|
11971
11995
|
}
|
|
11972
11996
|
var dataItem = this.isSelectCustom ? { text: '' } : this.getItemData();
|
|
11973
|
-
var text = !isNullOrUndefined(dataItem.text) ? dataItem.text.replace(/\r\n|\n|\r/g, '') : dataItem.text;
|
|
11997
|
+
var text = !isNullOrUndefined(dataItem.text) ? dataItem.text.toString().replace(/\r\n|\n|\r/g, '') : dataItem.text;
|
|
11974
11998
|
var selected = !isNullOrUndefined(this.list) ? this.list.querySelector('.' + dropDownListClasses.selected) : null;
|
|
11975
11999
|
if (this.inputElement && text === this.inputElement.value && !isNullOrUndefined(selected)) {
|
|
11976
12000
|
if (this.isSelected) {
|
|
@@ -13538,11 +13562,16 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
13538
13562
|
if (!isNullOrUndefined(this.text) && (isNullOrUndefined(this.value) || this.value.length === 0)) {
|
|
13539
13563
|
this.initialTextUpdate();
|
|
13540
13564
|
}
|
|
13541
|
-
if (!this.enableVirtualization
|
|
13542
|
-
this.
|
|
13565
|
+
if (!this.enableVirtualization) {
|
|
13566
|
+
if (!this.isRemoveSelection) {
|
|
13567
|
+
this.initialValueUpdate(this.listData, true);
|
|
13568
|
+
}
|
|
13569
|
+
else {
|
|
13570
|
+
this.initialValueUpdate();
|
|
13571
|
+
}
|
|
13543
13572
|
}
|
|
13544
|
-
else if (!this.
|
|
13545
|
-
this.initialValueUpdate(
|
|
13573
|
+
else if (!(this.dataSource instanceof DataManager)) {
|
|
13574
|
+
this.initialValueUpdate();
|
|
13546
13575
|
}
|
|
13547
13576
|
this.initialUpdate();
|
|
13548
13577
|
this.refreshPlaceHolder();
|
|
@@ -15701,7 +15730,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
15701
15730
|
MultiSelect.prototype.dispatchSelect = function (value, eve, element, isNotTrigger, length, dataValue, text) {
|
|
15702
15731
|
var _this = this;
|
|
15703
15732
|
var list = this.listData;
|
|
15704
|
-
if (this.initStatus && !isNotTrigger) {
|
|
15733
|
+
if (this.initStatus && !isNotTrigger && (!this.allowObjectBinding || (this.allowObjectBinding && value))) {
|
|
15705
15734
|
value = this.allowObjectBinding ? getValue(((this.fields.value) ? this.fields.value : ''), value) : value;
|
|
15706
15735
|
var val_2 = dataValue ? dataValue : this.getDataByValue(value);
|
|
15707
15736
|
var eventArgs = {
|
|
@@ -16610,7 +16639,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16610
16639
|
else {
|
|
16611
16640
|
if (this_1.listData) {
|
|
16612
16641
|
if (this_1.enableVirtualization) {
|
|
16613
|
-
if (delim && !this_1.isDynamicRemoteVirtualData) {
|
|
16642
|
+
if (delim && !this_1.isDynamicRemoteVirtualData && !isInitialVirtualData) {
|
|
16614
16643
|
data = this_1.delimiterWrapper && this_1.delimiterWrapper.innerHTML === '' ? data :
|
|
16615
16644
|
this_1.delimiterWrapper.innerHTML;
|
|
16616
16645
|
}
|
|
@@ -16622,7 +16651,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16622
16651
|
text = this_1.text.split(delimiterChar);
|
|
16623
16652
|
}
|
|
16624
16653
|
else {
|
|
16625
|
-
temp = isInitialVirtualData && delim ? this_1.text : this_1.getTextByValue(value);
|
|
16654
|
+
temp = isInitialVirtualData && delim ? this_1.text.replace(/,/g, delimiterChar + ' ') : this_1.getTextByValue(value);
|
|
16626
16655
|
var textValues = this_1.isDynamicRemoteVirtualData && value != null && value !== '' && !isInitialVirtualData ?
|
|
16627
16656
|
this_1.getTextByValue(value) : isInitialVirtualData ? this_1.text : (this_1.text && this_1.text !== '' ? this_1.text + this_1.delimiterChar + temp : temp);
|
|
16628
16657
|
data += temp + delimiterChar + ' ';
|
|
@@ -16786,6 +16815,12 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16786
16815
|
text = this.getTextByValue(value);
|
|
16787
16816
|
isCustomData = true;
|
|
16788
16817
|
}
|
|
16818
|
+
else if ((isNullOrUndefined(text) && !this.allowCustomValue) &&
|
|
16819
|
+
((!(this.dataSource instanceof DataManager)) ||
|
|
16820
|
+
(this.dataSource instanceof DataManager && isInitialVirtualData))) {
|
|
16821
|
+
this.value.splice(index, 1);
|
|
16822
|
+
index -= 1;
|
|
16823
|
+
}
|
|
16789
16824
|
}
|
|
16790
16825
|
else {
|
|
16791
16826
|
text = this.getTextByValue(value);
|
|
@@ -18380,6 +18415,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18380
18415
|
this.isaddNonPresentItems = false;
|
|
18381
18416
|
}
|
|
18382
18417
|
else {
|
|
18418
|
+
this.selectedListData = [];
|
|
18383
18419
|
if (prop === 'text') {
|
|
18384
18420
|
this.initialTextUpdate();
|
|
18385
18421
|
newProp = this.value;
|
|
@@ -18423,7 +18459,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18423
18459
|
setTimeout(function () {
|
|
18424
18460
|
_this.initialValueUpdate(listItems_2, true);
|
|
18425
18461
|
_this.isDynamicRemoteVirtualData = false;
|
|
18426
|
-
_this.
|
|
18462
|
+
if (!_this.inputFocus || (_this.inputFocus && _this.mode !== 'Default')) {
|
|
18463
|
+
_this.initialUpdate();
|
|
18464
|
+
}
|
|
18427
18465
|
}, 100);
|
|
18428
18466
|
}
|
|
18429
18467
|
});
|