@syncfusion/ej2-dropdowns 35.1.42 → 35.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 -10
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +43 -10
- 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 +3 -1
- package/src/drop-down-list/drop-down-list.js +40 -9
|
@@ -413,7 +413,9 @@ class VirtualScroll {
|
|
|
413
413
|
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
|
|
414
414
|
}
|
|
415
415
|
this.parent.updateVirtualReOrderList(true);
|
|
416
|
-
|
|
416
|
+
const totalCount = this.parent.dataSource instanceof DataManager
|
|
417
|
+
? this.parent.totalItemCount : this.parent.dataSource.length;
|
|
418
|
+
if (this.parent.value.length < this.parent.itemCount && this.parent.value.length !== totalCount) {
|
|
417
419
|
const oldUlElement = this.parent.list.querySelector('.e-list-parent' + ':not(.e-reorder)');
|
|
418
420
|
if (oldUlElement) {
|
|
419
421
|
this.parent.list.querySelector('.e-virtual-ddl-content').removeChild(oldUlElement);
|
|
@@ -3536,8 +3538,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3536
3538
|
'aria-disabled': 'false',
|
|
3537
3539
|
'role': 'combobox',
|
|
3538
3540
|
'aria-expanded': 'false',
|
|
3539
|
-
'aria-live': 'polite'
|
|
3540
|
-
'aria-labelledby': this.hiddenElement.id
|
|
3541
|
+
'aria-live': 'polite'
|
|
3541
3542
|
};
|
|
3542
3543
|
}
|
|
3543
3544
|
setEnableRtl() {
|
|
@@ -6832,6 +6833,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6832
6833
|
if (isNullOrUndefined(this.inputElement.getAttribute('type'))) {
|
|
6833
6834
|
this.inputElement.setAttribute('type', 'text');
|
|
6834
6835
|
}
|
|
6836
|
+
if (this.getModuleName() === 'dropdownlist') {
|
|
6837
|
+
this.inputElement.setAttribute('aria-label', this.getModuleName());
|
|
6838
|
+
}
|
|
6835
6839
|
this.inputElement.setAttribute('aria-expanded', 'false');
|
|
6836
6840
|
}
|
|
6837
6841
|
else {
|
|
@@ -6918,7 +6922,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6918
6922
|
if (!this.targetElement().hasAttribute('aria-label')) {
|
|
6919
6923
|
attributes(this.targetElement(), { 'aria-label': this.getModuleName() });
|
|
6920
6924
|
}
|
|
6921
|
-
if (!this.inputElement.hasAttribute('aria-labelledby')) {
|
|
6925
|
+
if (this.getModuleName() !== 'dropdownlist' && !this.inputElement.hasAttribute('aria-labelledby')) {
|
|
6922
6926
|
this.inputElement.setAttribute('aria-labelledby', this.hiddenElement.id);
|
|
6923
6927
|
}
|
|
6924
6928
|
this.inputElement.setAttribute('aria-expanded', 'false');
|
|
@@ -6926,9 +6930,19 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6926
6930
|
attributes(this.targetElement(), this.getAriaAttributes());
|
|
6927
6931
|
this.updateDataAttribute(this.htmlAttributes);
|
|
6928
6932
|
this.setHTMLAttributes();
|
|
6929
|
-
if (this.targetElement() === this.inputElement) {
|
|
6933
|
+
if (this.getModuleName() !== 'dropdownlist' && this.targetElement() === this.inputElement) {
|
|
6930
6934
|
this.inputElement.removeAttribute('aria-labelledby');
|
|
6931
6935
|
}
|
|
6936
|
+
if (this.getModuleName() === 'dropdownlist' && this.targetElement() === this.inputWrapper.container) {
|
|
6937
|
+
const floatLabel = this.inputWrapper.container.getElementsByClassName('e-float-text')[0];
|
|
6938
|
+
if (!isNullOrUndefined(this.element.id) && this.element.id !== '' && !isNullOrUndefined(floatLabel)) {
|
|
6939
|
+
floatLabel.id = 'label_' + this.element.id.replace(/ /g, '_');
|
|
6940
|
+
attributes(this.inputWrapper.container, { 'aria-labelledby': floatLabel.id });
|
|
6941
|
+
}
|
|
6942
|
+
else {
|
|
6943
|
+
this.inputWrapper.container.removeAttribute('aria-labelledby');
|
|
6944
|
+
}
|
|
6945
|
+
}
|
|
6932
6946
|
if (this.value !== null || this.activeIndex !== null || this.text !== null) {
|
|
6933
6947
|
if (this.enableVirtualization) {
|
|
6934
6948
|
this.listItemHeight = this.getListHeight();
|
|
@@ -6987,7 +7001,12 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
6987
7001
|
const floatLabelElement = this.inputWrapper.container.getElementsByClassName('e-float-text')[0];
|
|
6988
7002
|
if (!isNullOrUndefined(this.element.id) && this.element.id !== '' && !isNullOrUndefined(floatLabelElement)) {
|
|
6989
7003
|
floatLabelElement.id = 'label_' + this.element.id.replace(/ /g, '_');
|
|
6990
|
-
attributes(this.
|
|
7004
|
+
attributes(this.getModuleName() === 'dropdownlist'
|
|
7005
|
+
? this.inputWrapper.container
|
|
7006
|
+
: this.inputElement, { 'aria-labelledby': floatLabelElement.id });
|
|
7007
|
+
if (this.getModuleName() === 'dropdownlist' && this.inputElement) {
|
|
7008
|
+
this.inputElement.removeAttribute('aria-labelledby');
|
|
7009
|
+
}
|
|
6991
7010
|
}
|
|
6992
7011
|
this.renderComplete();
|
|
6993
7012
|
this.listItemHeight = this.getListHeight();
|
|
@@ -7203,7 +7222,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
7203
7222
|
if (label) {
|
|
7204
7223
|
label.remove();
|
|
7205
7224
|
}
|
|
7206
|
-
this.
|
|
7225
|
+
this.inputWrapper.container.removeAttribute('aria-labelledby');
|
|
7207
7226
|
}
|
|
7208
7227
|
else if (this.floatLabelType !== 'Never' && !this.value) {
|
|
7209
7228
|
let floatLabel = this.inputWrapper.container
|
|
@@ -7235,7 +7254,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
7235
7254
|
}
|
|
7236
7255
|
floatLabel.style.width = this.inputElement.offsetWidth + 'px';
|
|
7237
7256
|
floatLabel.textContent = newProp.placeholder;
|
|
7238
|
-
this.
|
|
7257
|
+
this.inputWrapper.container.setAttribute('aria-labelledby', floatLabel.id);
|
|
7239
7258
|
}
|
|
7240
7259
|
}
|
|
7241
7260
|
break;
|
|
@@ -7448,14 +7467,28 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
7448
7467
|
this.updateSelectElementData(this.allowFiltering);
|
|
7449
7468
|
}
|
|
7450
7469
|
break;
|
|
7451
|
-
case 'floatLabelType':
|
|
7470
|
+
case 'floatLabelType': {
|
|
7452
7471
|
Input.removeFloating(this.inputWrapper);
|
|
7453
7472
|
Input.addFloating(this.inputElement, newProp.floatLabelType, this.placeholder, this.createElement);
|
|
7454
7473
|
if (!isNullOrUndefined(this.inputWrapper.buttons[0]) &&
|
|
7455
7474
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0] && this.floatLabelType !== 'Never') {
|
|
7456
7475
|
this.inputWrapper.container.getElementsByClassName('e-float-text-overflow')[0].classList.add('e-icon');
|
|
7457
7476
|
}
|
|
7477
|
+
if (this.getModuleName() === 'dropdownlist') {
|
|
7478
|
+
const floatLabelElement = this.inputWrapper.container.getElementsByClassName('e-float-text')[0];
|
|
7479
|
+
if (!isNullOrUndefined(this.element.id) &&
|
|
7480
|
+
this.element.id !== '' && !isNullOrUndefined(floatLabelElement)) {
|
|
7481
|
+
floatLabelElement.id = 'label_' + this.element.id.replace(/ /g, '_');
|
|
7482
|
+
attributes(this.inputWrapper.container, {
|
|
7483
|
+
'aria-labelledby': floatLabelElement.id
|
|
7484
|
+
});
|
|
7485
|
+
}
|
|
7486
|
+
else {
|
|
7487
|
+
this.inputWrapper.container.removeAttribute('aria-labelledby');
|
|
7488
|
+
}
|
|
7489
|
+
}
|
|
7458
7490
|
break;
|
|
7491
|
+
}
|
|
7459
7492
|
case 'showClearButton':
|
|
7460
7493
|
if (!this.inputWrapper.clearButton) {
|
|
7461
7494
|
Input.setClearButton(newProp.showClearButton, this.inputElement, this.inputWrapper, null, this.createElement);
|
|
@@ -7556,7 +7589,7 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
7556
7589
|
}
|
|
7557
7590
|
if (label && this.getModuleName() === 'dropdownlist' && (!this.placeholder || this.placeholder.trim() === '')) {
|
|
7558
7591
|
label.remove();
|
|
7559
|
-
this.
|
|
7592
|
+
this.inputWrapper.container.removeAttribute('aria-labelledby');
|
|
7560
7593
|
}
|
|
7561
7594
|
}
|
|
7562
7595
|
/**
|