@syncfusion/ej2-dropdowns 20.4.38 → 20.4.40

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.
@@ -5952,6 +5952,9 @@ let DropDownTree = class DropDownTree extends Component {
5952
5952
  }
5953
5953
  const eventArgs = { data: args.data };
5954
5954
  this.trigger('dataBound', eventArgs);
5955
+ if (this.filterObj === null) {
5956
+ this.isFilteredData = false;
5957
+ }
5955
5958
  if (this.isFilteredData) {
5956
5959
  this.treeObj.expandAll();
5957
5960
  }
@@ -14154,7 +14157,8 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
14154
14157
  dragArgs = extend(dragArgs, { destination: dragArgs1 });
14155
14158
  }
14156
14159
  this.trigger('drop', dragArgs);
14157
- let liCollElem = dragArgs.elements;
14160
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14161
+ const liCollElem = dragArgs.elements;
14158
14162
  if (liCollElem.length) {
14159
14163
  for (let i = 0; i < liCollElem.length; i++) {
14160
14164
  liCollElem[i].classList.remove('e-grabbed');
@@ -15033,7 +15037,7 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
15033
15037
  const isRefresh = tListBox.sortOrder !== 'None' || (tListBox.selectionSettings.showCheckbox !==
15034
15038
  fListBox.selectionSettings.showCheckbox) || tListBox.fields.groupBy || tListBox.itemTemplate || fListBox.itemTemplate;
15035
15039
  this.removeSelected(fListBox, fListBox.getSelectedItems());
15036
- const tempItems = [].slice.call(fListBox.jsonData);
15040
+ const tempItems = [].slice.call(fListBox.listData);
15037
15041
  const localDataArgs = { cancel: false, items: tempItems, eventName: this.toolbarAction };
15038
15042
  fListBox.trigger('actionBegin', localDataArgs);
15039
15043
  if (localDataArgs.cancel) {
@@ -15078,11 +15082,18 @@ let ListBox = ListBox_1 = class ListBox extends DropDownBase {
15078
15082
  fListBox.value = [];
15079
15083
  listData = listData
15080
15084
  .filter((data) => data.isHeader !== true);
15081
- tListBox.listData = tListBox.jsonData = listData;
15085
+ const sortedData = listData.filter(function (val) {
15086
+ return tListBox.jsonData.indexOf(val) === -1;
15087
+ });
15088
+ for (let i = 0; i < sortedData.length; i++) {
15089
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
15090
+ tListBox.jsonData.splice(index + i, 0, sortedData[i]);
15091
+ }
15092
+ tListBox.listData = listData;
15082
15093
  if (fListBox.listData.length === fListBox.jsonData.length) {
15083
15094
  fListBox.listData = fListBox.sortedData = fListBox.jsonData = [];
15084
15095
  }
15085
- else if (this.allowFiltering) {
15096
+ else if (fListBox.allowFiltering) {
15086
15097
  for (let i = 0; i < fListBox.listData.length; i++) {
15087
15098
  for (let j = 0; j < fListBox.jsonData.length; j++) {
15088
15099
  if (fListBox.listData[i] === fListBox.jsonData[j]) {