@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
|
@@ -477,7 +477,7 @@ class VirtualScroll {
|
|
|
477
477
|
this.parent.totalItemsCount();
|
|
478
478
|
}
|
|
479
479
|
if (isListUpdated) {
|
|
480
|
-
if (this.component === 'multiselect' && this.parent.itemCount * 2 > this.parent.totalItemCount) {
|
|
480
|
+
if (this.component === 'multiselect' && this.parent.itemCount * 2 > this.parent.totalItemCount && !(this.parent.dataSource instanceof DataManager)) {
|
|
481
481
|
this.parent.viewPortInfo.endIndex = endIndex = this.parent.totalItemCount;
|
|
482
482
|
this.parent.isVirtualTrackHeight = true;
|
|
483
483
|
}
|
|
@@ -1282,6 +1282,12 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1282
1282
|
translateY = translateY - (this.skeletonCount * this.listItemHeight);
|
|
1283
1283
|
translateY = ((this.viewPortInfo.startIndex === 0 && this.listData && this.listData.length === 0) ||
|
|
1284
1284
|
this.skeletonCount === 0) ? 0 : translateY;
|
|
1285
|
+
const virtualElement = this.list.getElementsByClassName('e-virtual-ddl')[0];
|
|
1286
|
+
const style = virtualElement && virtualElement.style && virtualElement.style.height;
|
|
1287
|
+
if (this.getModuleName() === 'multiselect' && !isNullOrUndefined(style) && style === '' &&
|
|
1288
|
+
this.dataSource instanceof DataManager) {
|
|
1289
|
+
translateY = 0;
|
|
1290
|
+
}
|
|
1285
1291
|
const styleText = `transform: translate(0px, ${translateY}px);`;
|
|
1286
1292
|
return styleText;
|
|
1287
1293
|
}
|
|
@@ -3626,6 +3632,11 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3626
3632
|
this.isActive = false;
|
|
3627
3633
|
this.beforePopupOpen = false;
|
|
3628
3634
|
}
|
|
3635
|
+
// Cancel any pending debounced filtering when focus leaves the component.
|
|
3636
|
+
if (this.debounceTimer !== null) {
|
|
3637
|
+
clearTimeout(this.debounceTimer);
|
|
3638
|
+
this.debounceTimer = null;
|
|
3639
|
+
}
|
|
3629
3640
|
this.isFocused = false;
|
|
3630
3641
|
}
|
|
3631
3642
|
focusOutAction(e) {
|
|
@@ -6676,6 +6687,12 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6676
6687
|
}
|
|
6677
6688
|
else {
|
|
6678
6689
|
this.inputElement = this.createElement('input', { attrs: { role: 'combobox', type: 'text' } });
|
|
6690
|
+
if (this.element.tagName === this.getNgDirective()) {
|
|
6691
|
+
// Pre-populate id so Input.createInput/createFloatingInput can wire label.for correctly
|
|
6692
|
+
const ngId = this.element.getAttribute('id') ? this.element.getAttribute('id') : getUniqueID('ej2_dropdownlist');
|
|
6693
|
+
this.element.id = ngId;
|
|
6694
|
+
this.inputElement.id = ngId + '_input';
|
|
6695
|
+
}
|
|
6679
6696
|
if (this.element.tagName !== this.getNgDirective()) {
|
|
6680
6697
|
this.element.style.display = 'none';
|
|
6681
6698
|
}
|
|
@@ -6739,6 +6756,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6739
6756
|
const id = this.element.getAttribute('id') ? this.element.getAttribute('id') : getUniqueID('ej2_dropdownlist');
|
|
6740
6757
|
this.element.id = id;
|
|
6741
6758
|
this.hiddenElement.id = id + '_hidden';
|
|
6759
|
+
if (this.element.tagName === this.getNgDirective() && !this.inputElement.id) {
|
|
6760
|
+
this.inputElement.id = id + '_input';
|
|
6761
|
+
}
|
|
6742
6762
|
this.targetElement().setAttribute('tabindex', this.tabIndex);
|
|
6743
6763
|
if ((this.getModuleName() === 'autocomplete' || this.getModuleName() === 'combobox') && !this.readonly) {
|
|
6744
6764
|
if (!this.inputElement.hasAttribute('aria-label')) {
|
|
@@ -13128,9 +13148,15 @@ function createFloatLabel(overAllWrapper, searchWrapper, element, inputElement,
|
|
|
13128
13148
|
const floatLabelElement = createElement('label', { className: FLOATTEXT });
|
|
13129
13149
|
const id = element.getAttribute('id') ? element.getAttribute('id') : getUniqueID('ej2_multiselect');
|
|
13130
13150
|
element.id = id;
|
|
13151
|
+
let isAngularComponent = false;
|
|
13152
|
+
if (element.tagName && element.tagName.indexOf('EJS-') === 0 && inputElement.id === '' && element !== inputElement) {
|
|
13153
|
+
inputElement.id = id + '_input';
|
|
13154
|
+
isAngularComponent = true;
|
|
13155
|
+
}
|
|
13131
13156
|
if (!isNullOrUndefined(element.id) && element.id !== '') {
|
|
13132
|
-
|
|
13133
|
-
floatLabelElement.
|
|
13157
|
+
const labelTarget = isAngularComponent ? inputElement.id || element.id : element.id;
|
|
13158
|
+
floatLabelElement.id = 'label_' + labelTarget.replace(/ /g, '_');
|
|
13159
|
+
floatLabelElement.setAttribute('for', labelTarget);
|
|
13134
13160
|
attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });
|
|
13135
13161
|
}
|
|
13136
13162
|
if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {
|
|
@@ -15739,6 +15765,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15739
15765
|
selectedChips[0].removeAttribute('id');
|
|
15740
15766
|
if (!isNullOrUndefined(this.inputElement) && this.inputElement.hasAttribute('aria-activedescendant')) {
|
|
15741
15767
|
this.inputElement.removeAttribute('aria-activedescendant');
|
|
15768
|
+
if (!this.inputElement.hasAttribute('aria-describedby') && this.chipCollectionWrapper.id) {
|
|
15769
|
+
this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
|
|
15770
|
+
}
|
|
15742
15771
|
}
|
|
15743
15772
|
}
|
|
15744
15773
|
this.removeChipFocus();
|
|
@@ -15750,6 +15779,9 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
15750
15779
|
element.setAttribute('id', this.element.id + '_chip_item');
|
|
15751
15780
|
if (!isNullOrUndefined(this.inputElement) && element.id) {
|
|
15752
15781
|
this.inputElement.setAttribute('aria-activedescendant', element.id);
|
|
15782
|
+
if (this.inputElement.hasAttribute('aria-describedby')) {
|
|
15783
|
+
this.inputElement.removeAttribute('aria-describedby');
|
|
15784
|
+
}
|
|
15753
15785
|
}
|
|
15754
15786
|
const chipClose = element.querySelector('span.' + CHIP_CLOSE$1.split(' ')[0]);
|
|
15755
15787
|
if (chipClose) {
|
|
@@ -18250,9 +18282,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
18250
18282
|
firstItems.forEach((node) => {
|
|
18251
18283
|
fragment.appendChild(node.cloneNode(true));
|
|
18252
18284
|
});
|
|
18253
|
-
|
|
18254
|
-
|
|
18255
|
-
|
|
18285
|
+
if ((this.totalItemCount >= (this.itemCount * 2) && this.dataSource instanceof DataManager)) {
|
|
18286
|
+
li.forEach((node) => {
|
|
18287
|
+
fragment.appendChild(node.cloneNode(true));
|
|
18288
|
+
});
|
|
18289
|
+
}
|
|
18256
18290
|
const concatenatedNodeList = fragment.childNodes;
|
|
18257
18291
|
if (this.virtualSelectAllData instanceof Array) {
|
|
18258
18292
|
while (index < length && index <= 50 && index < count) {
|
|
@@ -19146,7 +19180,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
19146
19180
|
this.renderItems(this.mainData, this.fields);
|
|
19147
19181
|
}
|
|
19148
19182
|
this.virtualCustomData = null;
|
|
19149
|
-
this.isVirtualTrackHeight = this.totalItemCount >= (this.itemCount * 2)
|
|
19183
|
+
this.isVirtualTrackHeight = (this.totalItemCount >= (this.itemCount * 2) ||
|
|
19184
|
+
this.dataSource instanceof DataManager) ? false : true;
|
|
19150
19185
|
}
|
|
19151
19186
|
});
|
|
19152
19187
|
}
|
|
@@ -19360,7 +19395,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
19360
19395
|
}
|
|
19361
19396
|
else {
|
|
19362
19397
|
this.chipCollectionWrapper = this.createElement('span', {
|
|
19363
|
-
className: CHIP_WRAPPER$1
|
|
19398
|
+
className: CHIP_WRAPPER$1
|
|
19364
19399
|
});
|
|
19365
19400
|
this.chipCollectionWrapper.style.display = 'none';
|
|
19366
19401
|
if (this.mode === 'Default') {
|