@syncfusion/ej2-dropdowns 22.2.9 → 22.2.11

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.
@@ -413,24 +413,30 @@ let DropDownBase = class DropDownBase extends Component {
413
413
  }
414
414
  const templateName = actionFailure ? 'actionFailureTemplate' : 'noRecordsTemplate';
415
415
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
416
- const noDataCompTemp = compiledString({}, this, templateName, templateId, this.isStringTemplate, null, ele);
417
- if (noDataCompTemp && noDataCompTemp.length > 0) {
418
- for (let i = 0; i < noDataCompTemp.length; i++) {
416
+ let noDataElement;
417
+ if ((this.isReact) && typeof template === 'function') {
418
+ noDataElement = compiledString({}, this, templateName, templateId, this.isStringTemplate, null);
419
+ }
420
+ else {
421
+ noDataElement = compiledString({}, this, templateName, templateId, this.isStringTemplate, null, ele);
422
+ }
423
+ if (noDataElement && noDataElement.length > 0) {
424
+ for (let i = 0; i < noDataElement.length; i++) {
419
425
  if (this.getModuleName() === 'listbox' && templateName === 'noRecordsTemplate') {
420
- if (noDataCompTemp[i].nodeName === '#text') {
426
+ if (noDataElement[i].nodeName === '#text') {
421
427
  const liElem = this.createElement('li');
422
- liElem.textContent = noDataCompTemp[i].textContent;
428
+ liElem.textContent = noDataElement[i].textContent;
423
429
  liElem.classList.add('e-list-nrt');
424
430
  liElem.setAttribute('role', 'option');
425
431
  ele.appendChild(liElem);
426
432
  }
427
433
  else {
428
- noDataCompTemp[i].classList.add('e-list-nr-template');
429
- ele.appendChild(noDataCompTemp[i]);
434
+ noDataElement[i].classList.add('e-list-nr-template');
435
+ ele.appendChild(noDataElement[i]);
430
436
  }
431
437
  }
432
438
  else {
433
- ele.appendChild(noDataCompTemp[i]);
439
+ ele.appendChild(noDataElement[i]);
434
440
  }
435
441
  }
436
442
  }
@@ -3247,7 +3253,7 @@ let DropDownList = class DropDownList extends DropDownBase {
3247
3253
  this.wireListEvents();
3248
3254
  }
3249
3255
  this.selectedElementID = this.selectedLI ? this.selectedLI.id : null;
3250
- attributes(this.targetElement(), { 'aria-expanded': 'true', 'aria-owns': this.inputElement.id + '_options' });
3256
+ attributes(this.targetElement(), { 'aria-expanded': 'true', 'aria-owns': this.element.id + '_options' });
3251
3257
  this.inputElement.setAttribute('aria-expanded', 'true');
3252
3258
  const inputParent = this.isFiltering() ? this.filterInput.parentElement : this.inputWrapper.container;
3253
3259
  addClass([inputParent], [dropDownListClasses.inputFocus]);
@@ -4021,8 +4027,10 @@ let DropDownList = class DropDownList extends DropDownBase {
4021
4027
  }
4022
4028
  break;
4023
4029
  case 'showClearButton':
4024
- Input.setClearButton(newProp.showClearButton, this.inputElement, this.inputWrapper, null, this.createElement);
4025
- this.bindClearEvent();
4030
+ if (!this.inputWrapper.clearButton) {
4031
+ Input.setClearButton(newProp.showClearButton, this.inputElement, this.inputWrapper, null, this.createElement);
4032
+ this.bindClearEvent();
4033
+ }
4026
4034
  break;
4027
4035
  default:
4028
4036
  {
@@ -12851,6 +12859,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12851
12859
  * @returns {void}
12852
12860
  */
12853
12861
  render() {
12862
+ if (!isNullOrUndefined(this.value)) {
12863
+ // eslint-disable-next-line
12864
+ this.value = [...this.value];
12865
+ }
12854
12866
  this.setDynValue = this.initStatus = false;
12855
12867
  this.isSelectAll = false;
12856
12868
  this.selectAllEventEle = [];