@syncfusion/ej2-dropdowns 24.1.46 → 24.1.47

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.
@@ -1446,24 +1446,27 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1446
1446
  * @returns {HTMLElement} Return the ul li list items.
1447
1447
  */
1448
1448
  DropDownBase.prototype.createListItems = function (dataSource, fields) {
1449
- if (dataSource && fields.groupBy || this.element.querySelector('optgroup')) {
1450
- if (fields.groupBy) {
1451
- if (this.sortOrder !== 'None') {
1452
- dataSource = this.getSortedDataSource(dataSource);
1449
+ if (dataSource) {
1450
+ if (fields.groupBy || this.element.querySelector('optgroup')) {
1451
+ if (fields.groupBy) {
1452
+ if (this.sortOrder !== 'None') {
1453
+ dataSource = this.getSortedDataSource(dataSource);
1454
+ }
1455
+ dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder);
1453
1456
  }
1454
- dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder);
1457
+ addClass([this.list], dropDownBaseClasses.grouping);
1455
1458
  }
1456
- addClass([this.list], dropDownBaseClasses.grouping);
1457
- }
1458
- else {
1459
- dataSource = this.getSortedDataSource(dataSource);
1459
+ else {
1460
+ dataSource = this.getSortedDataSource(dataSource);
1461
+ }
1462
+ var options = this.listOption(dataSource, fields);
1463
+ var spliceData = (dataSource.length > 100) ?
1464
+ new DataManager(dataSource).executeLocal(new Query().take(100))
1465
+ : dataSource;
1466
+ this.sortedData = dataSource;
1467
+ return ListBase.createList(this.createElement, (this.getModuleName() === 'autocomplete') ? spliceData : dataSource, options, true, this);
1460
1468
  }
1461
- var options = this.listOption(dataSource, fields);
1462
- var spliceData = (dataSource.length > 100) ?
1463
- new DataManager(dataSource).executeLocal(new Query().take(100))
1464
- : dataSource;
1465
- this.sortedData = dataSource;
1466
- return ListBase.createList(this.createElement, (this.getModuleName() === 'autocomplete') ? spliceData : dataSource, options, true, this);
1469
+ return null;
1467
1470
  };
1468
1471
  DropDownBase.prototype.listOption = function (dataSource, fields) {
1469
1472
  var iconCss = isNullOrUndefined(fields.iconCss) ? false : true;
@@ -1551,7 +1554,8 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1551
1554
  };
1552
1555
  DropDownBase.prototype.updateGroupFixedHeader = function (element, target) {
1553
1556
  this.fixedHeaderElement.innerHTML = element.innerHTML;
1554
- this.fixedHeaderElement.style.top = target.scrollTop + 'px';
1557
+ this.fixedHeaderElement.style.position = 'fixed';
1558
+ this.fixedHeaderElement.style.top = this.list.parentElement.offsetTop + this.list.offsetTop + 'px';
1555
1559
  this.fixedHeaderElement.style.display = 'block';
1556
1560
  };
1557
1561
  DropDownBase.prototype.getValidLi = function () {
@@ -1726,10 +1730,12 @@ var DropDownBase = /** @__PURE__ @class */ (function (_super) {
1726
1730
  DropDownBase.prototype.getIndexByValueFilter = function (value) {
1727
1731
  var index;
1728
1732
  var listItems = this.renderItems(this.selectData, this.fields);
1729
- for (var i = 0; i < listItems.children.length; i++) {
1730
- if (!isNullOrUndefined(value) && listItems.children[i].getAttribute('data-value') === value.toString()) {
1731
- index = i;
1732
- break;
1733
+ if (listItems && listItems.children) {
1734
+ for (var i = 0; i < listItems.children.length; i++) {
1735
+ if (!isNullOrUndefined(value) && listItems.children[i].getAttribute('data-value') === value.toString()) {
1736
+ index = i;
1737
+ break;
1738
+ }
1733
1739
  }
1734
1740
  }
1735
1741
  return index;
@@ -11335,7 +11341,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
11335
11341
  }
11336
11342
  if (activeElement && activeElement.item !== null) {
11337
11343
  this.addListFocus(activeElement.item);
11338
- this.scrollBottom(activeElement.item, activeElement.index);
11344
+ if (((this.allowCustomValue || this.allowFiltering) && this.isPopupOpen() && this.closePopupOnSelect) || this.closePopupOnSelect) {
11345
+ this.scrollBottom(activeElement.item, activeElement.index);
11346
+ }
11339
11347
  }
11340
11348
  };
11341
11349
  MultiSelect.prototype.getAriaAttributes = function () {
@@ -16286,6 +16294,19 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
16286
16294
  this.list.insertBefore(searchEle, this.list.firstElementChild);
16287
16295
  this.filterParent = this.list.getElementsByClassName('e-filter-parent')[0];
16288
16296
  this.filterWireEvents(searchEle);
16297
+ var inputSearch = searchEle.querySelector('.e-input-filter');
16298
+ if (inputSearch) {
16299
+ inputSearch.addEventListener('focus', function () {
16300
+ if (!searchEle.childNodes[0].classList.contains('e-input-focus')) {
16301
+ searchEle.childNodes[0].classList.add('e-input-focus');
16302
+ }
16303
+ });
16304
+ inputSearch.addEventListener('blur', function () {
16305
+ if (searchEle.childNodes[0].classList.contains('e-input-focus')) {
16306
+ searchEle.childNodes[0].classList.remove('e-input-focus');
16307
+ }
16308
+ });
16309
+ }
16289
16310
  }
16290
16311
  this.initWrapper();
16291
16312
  this.setSelection();
@@ -19568,12 +19589,6 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
19568
19589
  if (this.isPopupOpen) {
19569
19590
  this.hidePopup();
19570
19591
  }
19571
- //New event to update the RichTextEditor value, when a mention item is selected using mouse click action.
19572
- if (!isNullOrUndefined(e.pointerType) && e.pointerType === 'mouse') {
19573
- var event_1 = new CustomEvent('content-changed', { detail: { click: true } });
19574
- this.inputElement.dispatchEvent(event_1);
19575
- }
19576
-
19577
19592
  this.onChangeEvent(e);
19578
19593
  }
19579
19594
  else {
@@ -19619,6 +19634,12 @@ var Mention = /** @__PURE__ @class */ (function (_super) {
19619
19634
  if (this.isPopupOpen) {
19620
19635
  this.hidePopup();
19621
19636
  }
19637
+ //New event to update the RichTextEditor value, when a mention item is selected using mouse click action.
19638
+ if (!isNullOrUndefined(e.pointerType) && e.pointerType === 'mouse') {
19639
+ var event_1 = new CustomEvent('content-changed', { detail: { click: true } });
19640
+ this.inputElement.dispatchEvent(event_1);
19641
+ }
19642
+
19622
19643
  this.onChangeEvent(e);
19623
19644
  }
19624
19645
  };