@syncfusion/ej2-dropdowns 20.2.45 → 20.2.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.
@@ -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');
@@ -3536,6 +3539,11 @@ let DropDownList = class DropDownList extends DropDownBase {
3536
3539
  if (this.element.hasAttribute('data-val')) {
3537
3540
  this.element.setAttribute('data-val', 'false');
3538
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
+ }
3539
3547
  this.renderComplete();
3540
3548
  }
3541
3549
  setFooterTemplate(popupEle) {
@@ -8584,9 +8592,11 @@ const LABELBOTTOM = 'e-label-bottom';
8584
8592
  function createFloatLabel(overAllWrapper, searchWrapper, element, inputElement, value, floatLabelType, placeholder) {
8585
8593
  const floatLinelement = createElement('span', { className: FLOATLINE });
8586
8594
  const floatLabelElement = createElement('label', { className: FLOATTEXT });
8595
+ const id = element.getAttribute('id') ? element.getAttribute('id') : getUniqueID('ej2_multiselect');
8596
+ element.id = id;
8587
8597
  if (!isNullOrUndefined(element.id) && element.id !== '') {
8588
8598
  floatLabelElement.id = 'label_' + element.id.replace(/ /g, '_');
8589
- attributes(element, { 'aria-labelledby': floatLabelElement.id });
8599
+ attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });
8590
8600
  }
8591
8601
  if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {
8592
8602
  floatLabelElement.innerText = encodePlaceholder(inputElement.placeholder);