@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.
@@ -257,6 +257,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
257
257
  _this.isAngular = false;
258
258
  _this.isPreventChange = false;
259
259
  _this.isDynamicDataChange = false;
260
+ _this.addedNewItem = false;
260
261
  return _this;
261
262
  }
262
263
  DropDownBase.prototype.getPropObject = function (prop, newProp, oldProp) {
@@ -1059,7 +1060,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1059
1060
  dataSource = this.selectData;
1060
1061
  }
1061
1062
  }
1062
- dataSource = this.getModuleName() === 'combobox' && this.selectData && dataSource instanceof Array && dataSource.length < this.selectData.length ? this.selectData : dataSource;
1063
+ dataSource = this.getModuleName() === 'combobox' && this.selectData && dataSource instanceof Array && dataSource.length < this.selectData.length && this.addedNewItem ? this.selectData : dataSource;
1064
+ this.addedNewItem = false;
1063
1065
  this.setListData(dataSource, fields, query, e);
1064
1066
  }
1065
1067
  };
@@ -1317,6 +1319,7 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1317
1319
  if (selectedItemValue || itemIndex === 0) {
1318
1320
  this.updateSelection();
1319
1321
  }
1322
+ this.addedNewItem = true;
1320
1323
  };
1321
1324
  DropDownBase.prototype.validationAttribute = function (target, hidden) {
1322
1325
  var name = target.getAttribute('name') ? target.getAttribute('name') : target.getAttribute('id');
@@ -3593,6 +3596,11 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3593
3596
  if (this.element.hasAttribute('data-val')) {
3594
3597
  this.element.setAttribute('data-val', 'false');
3595
3598
  }
3599
+ var floatLabelElement = this.inputWrapper.container.getElementsByClassName('e-float-text')[0];
3600
+ if (!isNullOrUndefined(this.element.id) && this.element.id !== '' && !isNullOrUndefined(floatLabelElement)) {
3601
+ floatLabelElement.id = 'label_' + this.element.id.replace(/ /g, '_');
3602
+ attributes(this.inputElement, { 'aria-labelledby': floatLabelElement.id });
3603
+ }
3596
3604
  this.renderComplete();
3597
3605
  };
3598
3606
  DropDownList.prototype.setFooterTemplate = function (popupEle) {
@@ -8724,9 +8732,11 @@ var LABELBOTTOM = 'e-label-bottom';
8724
8732
  function createFloatLabel(overAllWrapper, searchWrapper, element, inputElement, value, floatLabelType, placeholder) {
8725
8733
  var floatLinelement = createElement('span', { className: FLOATLINE });
8726
8734
  var floatLabelElement = createElement('label', { className: FLOATTEXT });
8735
+ var id = element.getAttribute('id') ? element.getAttribute('id') : getUniqueID('ej2_multiselect');
8736
+ element.id = id;
8727
8737
  if (!isNullOrUndefined(element.id) && element.id !== '') {
8728
8738
  floatLabelElement.id = 'label_' + element.id.replace(/ /g, '_');
8729
- attributes(element, { 'aria-labelledby': floatLabelElement.id });
8739
+ attributes(inputElement, { 'aria-labelledby': floatLabelElement.id });
8730
8740
  }
8731
8741
  if (!isNullOrUndefined(inputElement.placeholder) && inputElement.placeholder !== '') {
8732
8742
  floatLabelElement.innerText = encodePlaceholder(inputElement.placeholder);