@syncfusion/ej2-dropdowns 20.2.44 → 20.2.48
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 +2 -0
- 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 +17 -5
- package/dist/es6/ej2-dropdowns.es2015.js.map +1 -1
- package/dist/es6/ej2-dropdowns.es5.js +17 -5
- 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 +11 -11
- package/src/drop-down-base/drop-down-base.d.ts +1 -0
- package/src/drop-down-base/drop-down-base.js +4 -1
- package/src/drop-down-list/drop-down-list.js +10 -2
- package/src/multi-select/float-label.js +4 -2
- package/src/multi-select/multi-select.js +0 -1
|
@@ -238,6 +238,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
238
238
|
this.isAngular = false;
|
|
239
239
|
this.isPreventChange = false;
|
|
240
240
|
this.isDynamicDataChange = false;
|
|
241
|
+
this.addedNewItem = false;
|
|
241
242
|
}
|
|
242
243
|
getPropObject(prop, newProp, oldProp) {
|
|
243
244
|
const newProperty = new Object();
|
|
@@ -1034,7 +1035,8 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1034
1035
|
dataSource = this.selectData;
|
|
1035
1036
|
}
|
|
1036
1037
|
}
|
|
1037
|
-
dataSource = this.getModuleName() === 'combobox' && this.selectData && dataSource instanceof Array && dataSource.length < this.selectData.length ? this.selectData : dataSource;
|
|
1038
|
+
dataSource = this.getModuleName() === 'combobox' && this.selectData && dataSource instanceof Array && dataSource.length < this.selectData.length && this.addedNewItem ? this.selectData : dataSource;
|
|
1039
|
+
this.addedNewItem = false;
|
|
1038
1040
|
this.setListData(dataSource, fields, query, e);
|
|
1039
1041
|
}
|
|
1040
1042
|
}
|
|
@@ -1291,6 +1293,7 @@ let DropDownBase = class DropDownBase extends Component {
|
|
|
1291
1293
|
if (selectedItemValue || itemIndex === 0) {
|
|
1292
1294
|
this.updateSelection();
|
|
1293
1295
|
}
|
|
1296
|
+
this.addedNewItem = true;
|
|
1294
1297
|
}
|
|
1295
1298
|
validationAttribute(target, hidden) {
|
|
1296
1299
|
const name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
|
|
@@ -3447,14 +3450,14 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3447
3450
|
if (this.element.tagName === 'INPUT') {
|
|
3448
3451
|
this.inputElement = this.element;
|
|
3449
3452
|
if (isNullOrUndefined(this.inputElement.getAttribute('role'))) {
|
|
3450
|
-
this.inputElement.setAttribute('role', '
|
|
3453
|
+
this.inputElement.setAttribute('role', 'combobox');
|
|
3451
3454
|
}
|
|
3452
3455
|
if (isNullOrUndefined(this.inputElement.getAttribute('type'))) {
|
|
3453
3456
|
this.inputElement.setAttribute('type', 'text');
|
|
3454
3457
|
}
|
|
3455
3458
|
}
|
|
3456
3459
|
else {
|
|
3457
|
-
this.inputElement = this.createElement('input', { attrs: { role: '
|
|
3460
|
+
this.inputElement = this.createElement('input', { attrs: { role: 'combobox', type: 'text' } });
|
|
3458
3461
|
if (this.element.tagName !== this.getNgDirective()) {
|
|
3459
3462
|
this.element.style.display = 'none';
|
|
3460
3463
|
}
|
|
@@ -3503,6 +3506,9 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3503
3506
|
attributes(this.targetElement(), this.getAriaAttributes());
|
|
3504
3507
|
this.updateDataAttribute(this.htmlAttributes);
|
|
3505
3508
|
this.setHTMLAttributes();
|
|
3509
|
+
if (this.targetElement() === this.inputElement) {
|
|
3510
|
+
this.inputElement.removeAttribute('aria-labelledby');
|
|
3511
|
+
}
|
|
3506
3512
|
if (this.value !== null || this.activeIndex !== null || this.text !== null) {
|
|
3507
3513
|
this.initValue();
|
|
3508
3514
|
}
|
|
@@ -3533,6 +3539,11 @@ let DropDownList = class DropDownList extends DropDownBase {
|
|
|
3533
3539
|
if (this.element.hasAttribute('data-val')) {
|
|
3534
3540
|
this.element.setAttribute('data-val', 'false');
|
|
3535
3541
|
}
|
|
3542
|
+
const floatLabelElement = this.inputWrapper.container.getElementsByClassName('e-float-text')[0];
|
|
3543
|
+
if (!isNullOrUndefined(this.element.id) && this.element.id !== '' && !isNullOrUndefined(floatLabelElement)) {
|
|
3544
|
+
floatLabelElement.id = 'label_' + this.element.id.replace(/ /g, '_');
|
|
3545
|
+
attributes(this.inputElement, { 'aria-labelledby': floatLabelElement.id });
|
|
3546
|
+
}
|
|
3536
3547
|
this.renderComplete();
|
|
3537
3548
|
}
|
|
3538
3549
|
setFooterTemplate(popupEle) {
|
|
@@ -8581,9 +8592,11 @@ const LABELBOTTOM = 'e-label-bottom';
|
|
|
8581
8592
|
function createFloatLabel(overAllWrapper, searchWrapper, element, inputElement, value, floatLabelType, placeholder) {
|
|
8582
8593
|
const floatLinelement = createElement('span', { className: FLOATLINE });
|
|
8583
8594
|
const floatLabelElement = createElement('label', { className: FLOATTEXT });
|
|
8595
|
+
const id = element.getAttribute('id') ? element.getAttribute('id') : getUniqueID('ej2_multiselect');
|
|
8596
|
+
element.id = id;
|
|
8584
8597
|
if (!isNullOrUndefined(element.id) && element.id !== '') {
|
|
8585
8598
|
floatLabelElement.id = 'label_' + element.id.replace(/ /g, '_');
|
|
8586
|
-
attributes(
|
|
8599
|
+
attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });
|
|
8587
8600
|
}
|
|
8588
8601
|
if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {
|
|
8589
8602
|
floatLabelElement.innerText = encodePlaceholder(inputElement.placeholder);
|
|
@@ -12457,7 +12470,6 @@ let MultiSelect = class MultiSelect extends DropDownBase {
|
|
|
12457
12470
|
});
|
|
12458
12471
|
if (this.mode === 'Default' || this.mode === 'Box') {
|
|
12459
12472
|
this.inputElement.setAttribute('aria-describedby', this.chipCollectionWrapper.id);
|
|
12460
|
-
this.inputElement.setAttribute('aria-labelledby', this.chipCollectionWrapper.id);
|
|
12461
12473
|
}
|
|
12462
12474
|
if (this.element.tagName !== this.getNgDirective()) {
|
|
12463
12475
|
this.element.style.display = 'none';
|