@syncfusion/ej2-dropdowns 20.1.58 → 20.1.61

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.
@@ -2474,11 +2474,9 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2474
2474
  if (this.setValue(e)) {
2475
2475
  return;
2476
2476
  }
2477
- if (this.isPopupOpen) {
2478
- attributes(this.targetElement(), { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
2479
- if (this.isFilterLayout() && this.filterInput) {
2480
- attributes(this.filterInput, { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
2481
- }
2477
+ attributes(this.targetElement(), { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
2478
+ if (this.isFilterLayout() && this.filterInput) {
2479
+ attributes(this.filterInput, { 'aria-activedescendant': this.selectedLI ? this.selectedLI.id : null });
2482
2480
  }
2483
2481
  if ((!this.isPopupOpen && !isNullOrUndefined(li)) || (this.isPopupOpen && !isNullOrUndefined(e) &&
2484
2482
  (e.type !== 'keydown' || e.type === 'keydown' && e.action === 'enter'))) {
@@ -2511,13 +2509,21 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
2511
2509
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2512
2510
  if (this.isReact) {
2513
2511
  this.clearTemplate(['valueTemplate']);
2512
+ if (this.valueTempElement) {
2513
+ detach(this.valueTempElement);
2514
+ this.inputElement.style.display = 'block';
2515
+ this.valueTempElement = null;
2516
+ }
2514
2517
  }
2515
2518
  if (!this.valueTempElement) {
2516
2519
  this.valueTempElement = this.createElement('span', { className: dropDownListClasses.value });
2517
2520
  this.inputElement.parentElement.insertBefore(this.valueTempElement, this.inputElement);
2518
2521
  this.inputElement.style.display = 'none';
2519
2522
  }
2520
- this.valueTempElement.innerHTML = '';
2523
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
2524
+ if (!this.isReact) {
2525
+ this.valueTempElement.innerHTML = '';
2526
+ }
2521
2527
  var valuecheck = this.dropdownCompiler(this.valueTemplate);
2522
2528
  if (valuecheck) {
2523
2529
  compiledString = compile(document.querySelector(this.valueTemplate).innerHTML.trim());
@@ -3444,7 +3450,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3444
3450
  EventHandler.remove(this.filterInput, 'paste', this.pasteHandler);
3445
3451
  this.filterInput = null;
3446
3452
  }
3447
- attributes(this.targetElement(), { 'aria-expanded': 'false', 'aria-activedescendant': null });
3453
+ attributes(this.targetElement(), { 'aria-expanded': 'false' });
3448
3454
  this.inputWrapper.container.classList.remove(dropDownListClasses.iconAnimation);
3449
3455
  if (this.isFiltering()) {
3450
3456
  this.actionCompleteData.isUpdated = false;
@@ -3677,7 +3683,7 @@ var DropDownList = /** @__PURE__ @class */ (function (_super) {
3677
3683
  || (!(props.dataSource instanceof DataManager) && props.dataSource.length === 0)))) {
3678
3684
  this.clearAll(null, props);
3679
3685
  }
3680
- if ((this.fields.groupBy && props.fields) && !this.isGroupChecking) {
3686
+ if ((this.fields.groupBy && props.fields) && !this.isGroupChecking && this.list) {
3681
3687
  EventHandler.remove(this.list, 'scroll', this.setFloatingHeader);
3682
3688
  EventHandler.add(this.list, 'scroll', this.setFloatingHeader, this);
3683
3689
  }
@@ -8967,7 +8973,7 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
8967
8973
  else if (containerAttr.indexOf(htmlAttr) > -1) {
8968
8974
  this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
8969
8975
  }
8970
- else {
8976
+ else if (htmlAttr !== 'size') {
8971
8977
  this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
8972
8978
  }
8973
8979
  break;
@@ -9432,6 +9438,9 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9432
9438
  };
9433
9439
  MultiSelect.prototype.getQuery = function (query) {
9434
9440
  var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();
9441
+ if (this.isFiltered) {
9442
+ return filterQuery;
9443
+ }
9435
9444
  if (this.filterAction) {
9436
9445
  if (this.targetElement() !== null) {
9437
9446
  var dataType = this.typeOfData(this.dataSource).typeof;
@@ -9997,7 +10006,6 @@ var MultiSelect = /** @__PURE__ @class */ (function (_super) {
9997
10006
  if (!document.activeElement.classList.contains(FILTERINPUT)) {
9998
10007
  e.preventDefault();
9999
10008
  this.keyAction = true;
10000
- this.list.focus();
10001
10009
  }
10002
10010
  this.selectByKey(e);
10003
10011
  }
@@ -13601,6 +13609,7 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
13601
13609
  };
13602
13610
  ListBox.prototype.initWrapper = function () {
13603
13611
  var hiddenSelect = this.createElement('select', { className: 'e-hidden-select', attrs: { 'multiple': '' } });
13612
+ hiddenSelect.style.visibility = 'hidden';
13604
13613
  this.list.classList.add('e-listbox-wrapper');
13605
13614
  if (this.itemTemplate) {
13606
13615
  this.list.classList.add('e-list-template');
@@ -13929,12 +13938,12 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
13929
13938
  }
13930
13939
  };
13931
13940
  ListBox.prototype.beforeDragEnd = function (args) {
13932
- var dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
13933
- if (this.value.indexOf(dragValue) > -1) {
13941
+ this.dragValue = this.getFormattedValue(args.droppedElement.getAttribute('data-value'));
13942
+ if (this.value.indexOf(this.dragValue) > -1) {
13934
13943
  args.items = this.getDataByValues(this.value);
13935
13944
  }
13936
13945
  else {
13937
- args.items = this.getDataByValues([dragValue]);
13946
+ args.items = this.getDataByValues([this.dragValue]);
13938
13947
  }
13939
13948
  this.trigger('beforeDrop', args);
13940
13949
  };
@@ -15067,7 +15076,16 @@ var ListBox = /** @__PURE__ @class */ (function (_super) {
15067
15076
  return listObj;
15068
15077
  };
15069
15078
  ListBox.prototype.getGrabbedItems = function () {
15070
- var elems = Array.prototype.slice.call(this.element.querySelectorAll('.e-grabbed'));
15079
+ for (var i = 0; i < this.value.length; i++) {
15080
+ if (this.value[i] === this.dragValue) {
15081
+ var liColl = this.list.querySelectorAll('[aria-selected="true"]');
15082
+ for (var i_1 = 0; i_1 < liColl.length; i_1++) {
15083
+ liColl[i_1].classList.add('e-grabbed');
15084
+ }
15085
+ break;
15086
+ }
15087
+ }
15088
+ var elems = Array.prototype.slice.call(this.element.nextElementSibling.querySelectorAll('.e-grabbed'));
15071
15089
  return elems;
15072
15090
  };
15073
15091
  ListBox.prototype.getDragArgs = function (args, isDragEnd) {