@syncfusion/ej2-dropdowns 33.1.44 → 33.1.46
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 +43 -8
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +43 -8
- 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 +4 -4
- package/src/common/virtual-scroll.js +1 -1
- package/src/drop-down-base/drop-down-base.js +6 -0
- package/src/drop-down-list/drop-down-list.js +14 -0
- package/src/multi-select/float-label.js +8 -2
- package/src/multi-select/multi-select.js +14 -5
|
@@ -525,7 +525,7 @@ var VirtualScroll = /** @__PURE__ @class */ (function () {
|
|
|
525
525
|
this.parent.totalItemsCount();
|
|
526
526
|
}
|
|
527
527
|
if (isListUpdated) {
|
|
528
|
-
if (this.component === 'multiselect' && this.parent.itemCount * 2 > this.parent.totalItemCount) {
|
|
528
|
+
if (this.component === 'multiselect' && this.parent.itemCount * 2 > this.parent.totalItemCount && !(this.parent.dataSource instanceof DataManager)) {
|
|
529
529
|
this.parent.viewPortInfo.endIndex = endIndex = this.parent.totalItemCount;
|
|
530
530
|
this.parent.isVirtualTrackHeight = true;
|
|
531
531
|
}
|
|
@@ -1363,6 +1363,12 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
1363
1363
|
translateY = translateY - (this.skeletonCount * this.listItemHeight);
|
|
1364
1364
|
translateY = ((this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0) ||
|
|
1365
1365
|
this.skeletonCount === 0) ? 0 : translateY;
|
|
1366
|
+
var virtualElement = this.list.getElementsByClassName('e-virtual-ddl')[0];
|
|
1367
|
+
var style = virtualElement && virtualElement.style && virtualElement.style.height;
|
|
1368
|
+
if (this.getModuleName() === 'multiselect' && !isNullOrUndefined(style) && style === '' &&
|
|
1369
|
+
this.dataSource instanceof DataManager) {
|
|
1370
|
+
translateY = 0;
|
|
1371
|
+
}
|
|
1366
1372
|
var styleText = "transform: translate(0px, " + translateY + "px);";
|
|
1367
1373
|
return styleText;
|
|
1368
1374
|
};
|
|
@@ -3735,6 +3741,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
3735
3741
|
this.isActive = false;
|
|
3736
3742
|
this.beforePopupOpen = false;
|
|
3737
3743
|
}
|
|
3744
|
+
// Cancel any pending debounced filtering when focus leaves the component.
|
|
3745
|
+
if (this.debounceTimer !== null) {
|
|
3746
|
+
clearTimeout(this.debounceTimer);
|
|
3747
|
+
this.debounceTimer = null;
|
|
3748
|
+
}
|
|
3738
3749
|
this.isFocused = false;
|
|
3739
3750
|
};
|
|
3740
3751
|
DropDownList.prototype.focusOutAction = function (e) {
|
|
@@ -6811,6 +6822,12 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6811
6822
|
}
|
|
6812
6823
|
else {
|
|
6813
6824
|
this.inputElement = this.createElement('input', { attrs: { role: 'combobox', type: 'text' } });
|
|
6825
|
+
if (this.element.tagName === this.getNgDirective()) {
|
|
6826
|
+
// Pre-populate id so Input.createInput/createFloatingInput can wire label.for correctly
|
|
6827
|
+
var ngId = this.element.getAttribute('id') ? this.element.getAttribute('id') : getUniqueID('ej2_dropdownlist');
|
|
6828
|
+
this.element.id = ngId;
|
|
6829
|
+
this.inputElement.id = ngId + '_input';
|
|
6830
|
+
}
|
|
6814
6831
|
if (this.element.tagName !== this.getNgDirective()) {
|
|
6815
6832
|
this.element.style.display = 'none';
|
|
6816
6833
|
}
|
|
@@ -6874,6 +6891,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
|
|
|
6874
6891
|
var id = this.element.getAttribute('id') ? this.element.getAttribute('id') : getUniqueID('ej2_dropdownlist');
|
|
6875
6892
|
this.element.id = id;
|
|
6876
6893
|
this.hiddenElement.id = id + '_hidden';
|
|
6894
|
+
if (this.element.tagName === this.getNgDirective() && !this.inputElement.id) {
|
|
6895
|
+
this.inputElement.id = id + '_input';
|
|
6896
|
+
}
|
|
6877
6897
|
this.targetElement().setAttribute('tabindex', this.tabIndex);
|
|
6878
6898
|
if ((this.getModuleName() === 'autocomplete' || this.getModuleName() === 'combobox') && !this.readonly) {
|
|
6879
6899
|
if (!this.inputElement.hasAttribute('aria-label')) {
|
|
@@ -13369,9 +13389,15 @@ function createFloatLabel(overAllWrapper, searchWrapper, element, inputElement,
|
|
|
13369
13389
|
var floatLabelElement = createElement('label', { className: FLOATTEXT });
|
|
13370
13390
|
var id = element.getAttribute('id') ? element.getAttribute('id') : getUniqueID('ej2_multiselect');
|
|
13371
13391
|
element.id = id;
|
|
13392
|
+
var isAngularComponent = false;
|
|
13393
|
+
if (element.tagName && element.tagName.indexOf('EJS-') === 0 && inputElement.id === '' && element !== inputElement) {
|
|
13394
|
+
inputElement.id = id + '_input';
|
|
13395
|
+
isAngularComponent = true;
|
|
13396
|
+
}
|
|
13372
13397
|
if (!isNullOrUndefined(element.id) && element.id !== '') {
|
|
13373
|
-
|
|
13374
|
-
floatLabelElement.
|
|
13398
|
+
var labelTarget = isAngularComponent ? inputElement.id || element.id : element.id;
|
|
13399
|
+
floatLabelElement.id = 'label_' + labelTarget.replace(/ /g, '_');
|
|
13400
|
+
floatLabelElement.setAttribute('for', labelTarget);
|
|
13375
13401
|
attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });
|
|
13376
13402
|
}
|
|
13377
13403
|
if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {
|
|
@@ -16004,6 +16030,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16004
16030
|
selectedChips[0].removeAttribute('id');
|
|
16005
16031
|
if (!isNullOrUndefined(this.inputElement) && this.inputElement.hasAttribute('aria-activedescendant')) {
|
|
16006
16032
|
this.inputElement.removeAttribute('aria-activedescendant');
|
|
16033
|
+
if (!this.inputElement.hasAttribute('aria-describedby') && this.chipCollectionWrapper.id) {
|
|
16034
|
+
this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
|
|
16035
|
+
}
|
|
16007
16036
|
}
|
|
16008
16037
|
}
|
|
16009
16038
|
this.removeChipFocus();
|
|
@@ -16015,6 +16044,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
16015
16044
|
element.setAttribute('id', this.element.id + '_chip_item');
|
|
16016
16045
|
if (!isNullOrUndefined(this.inputElement) && element.id) {
|
|
16017
16046
|
this.inputElement.setAttribute('aria-activedescendant', element.id);
|
|
16047
|
+
if (this.inputElement.hasAttribute('aria-describedby')) {
|
|
16048
|
+
this.inputElement.removeAttribute('aria-describedby');
|
|
16049
|
+
}
|
|
16018
16050
|
}
|
|
16019
16051
|
var chipClose = element.querySelector('span.' + CHIP_CLOSE$1.split(' ')[0]);
|
|
16020
16052
|
if (chipClose) {
|
|
@@ -18540,9 +18572,11 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
18540
18572
|
firstItems.forEach(function (node) {
|
|
18541
18573
|
fragment_1.appendChild(node.cloneNode(true));
|
|
18542
18574
|
});
|
|
18543
|
-
|
|
18544
|
-
|
|
18545
|
-
|
|
18575
|
+
if ((this.totalItemCount >= (this.itemCount * 2) && this.dataSource instanceof DataManager)) {
|
|
18576
|
+
li.forEach(function (node) {
|
|
18577
|
+
fragment_1.appendChild(node.cloneNode(true));
|
|
18578
|
+
});
|
|
18579
|
+
}
|
|
18546
18580
|
var concatenatedNodeList = fragment_1.childNodes;
|
|
18547
18581
|
if (this.virtualSelectAllData instanceof Array) {
|
|
18548
18582
|
while (index < length && index <= 50 && index < count) {
|
|
@@ -19443,7 +19477,8 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19443
19477
|
_this.renderItems(_this.mainData, _this.fields);
|
|
19444
19478
|
}
|
|
19445
19479
|
_this.virtualCustomData = null;
|
|
19446
|
-
_this.isVirtualTrackHeight = _this.totalItemCount >= (_this.itemCount * 2)
|
|
19480
|
+
_this.isVirtualTrackHeight = (_this.totalItemCount >= (_this.itemCount * 2) ||
|
|
19481
|
+
_this.dataSource instanceof DataManager) ? false : true;
|
|
19447
19482
|
}
|
|
19448
19483
|
});
|
|
19449
19484
|
}
|
|
@@ -19660,7 +19695,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
|
|
|
19660
19695
|
}
|
|
19661
19696
|
else {
|
|
19662
19697
|
this.chipCollectionWrapper = this.createElement('span', {
|
|
19663
|
-
className: CHIP_WRAPPER$1
|
|
19698
|
+
className: CHIP_WRAPPER$1
|
|
19664
19699
|
});
|
|
19665
19700
|
this.chipCollectionWrapper.style.display = 'none';
|
|
19666
19701
|
if (this.mode === 'Default') {
|