@syncfusion/ej2-dropdowns 29.1.37 → 29.1.38

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.
@@ -1890,12 +1890,9 @@ let DropDownBase = class DropDownBase extends Component {
1890
1890
  if (this.sortOrder !== 'None') {
1891
1891
  dataSource = this.getSortedDataSource(dataSource);
1892
1892
  }
1893
- if (this.element.querySelector('optgroup') && this.isGroupChecking && this.getModuleName() === 'multiselect') {
1894
- dataSource = ListBase.groupDataSource(dataSource, fields, this.sortOrder);
1895
- }
1896
- else {
1897
- dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder);
1898
- }
1893
+ const fieldSet = fields.properties ||
1894
+ fields;
1895
+ dataSource = ListBase.groupDataSource(dataSource, fieldSet, this.sortOrder);
1899
1896
  }
1900
1897
  addClass([this.list], dropDownBaseClasses.grouping);
1901
1898
  }
@@ -13280,11 +13277,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13280
13277
  }
13281
13278
  if ((!this.enableVirtualization && ((searchCount === searchActiveCount || searchActiveCount === this.maximumSelectionLength)
13282
13279
  && (this.mode === 'CheckBox' && this.showSelectAll))) || (this.enableVirtualization && this.mode === 'CheckBox' &&
13283
- this.showSelectAll && this.virtualSelectAll && this.value && this.value.length === this.totalItemCount)) {
13280
+ this.showSelectAll && this.value && this.value.length === this.totalItemCount)) {
13284
13281
  this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'check' });
13285
13282
  }
13286
- else if ((searchCount !== searchActiveCount) && (this.mode === 'CheckBox' && this.showSelectAll) &&
13287
- ((!this.enableVirtualization) || (this.enableVirtualization && !this.virtualSelectAll))) {
13283
+ else if ((searchCount !== searchActiveCount) && (this.mode === 'CheckBox' && this.showSelectAll)) {
13288
13284
  this.notify('checkSelectAll', { module: 'CheckBoxSelection', enable: this.mode === 'CheckBox', value: 'uncheck' });
13289
13285
  }
13290
13286
  if (this.enableGroupCheckBox && this.fields.groupBy && !this.enableSelectionOrder) {
@@ -13698,6 +13694,17 @@ let MultiSelect = class MultiSelect extends DropDownBase {
13698
13694
  if (!(this.targetElement() && this.targetElement() !== '')) {
13699
13695
  e.preventDefault();
13700
13696
  }
13697
+ this.checkAndScrollParent();
13698
+ }
13699
+ checkAndScrollParent() {
13700
+ const parentElement = this.overAllWrapper ? this.overAllWrapper.parentElement : null;
13701
+ if (parentElement) {
13702
+ const wrapperHeight = parseFloat(getComputedStyle(this.overAllWrapper).height);
13703
+ const parentMaxHeight = parseFloat(getComputedStyle(parentElement).maxHeight);
13704
+ if (!isNaN(parentMaxHeight) && wrapperHeight > parentMaxHeight) {
13705
+ parentElement.scrollTop = parentElement.scrollHeight;
13706
+ }
13707
+ }
13701
13708
  }
13702
13709
  enable(state) {
13703
13710
  if (state) {
@@ -16431,6 +16438,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
16431
16438
  else {
16432
16439
  this.removeValue(value, e, length);
16433
16440
  }
16441
+ this.checkAndScrollParent();
16434
16442
  }
16435
16443
  updateListSelectEventCallback(value, li, e, currentText) {
16436
16444
  value = this.allowObjectBinding ? getValue(((this.fields.value) ? this.fields.value : ''), value) : value;
@@ -17010,7 +17018,8 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17010
17018
  this.updateWrapperText(this.viewWrapper, data);
17011
17019
  }
17012
17020
  wrapperleng = this.viewWrapper.offsetWidth +
17013
- parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
17021
+ parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10) +
17022
+ parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft, 10);
17014
17023
  overAllContainer = this.componentWrapper.offsetWidth -
17015
17024
  parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) -
17016
17025
  parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10);
@@ -17022,14 +17031,16 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17022
17031
  this.updateWrapperText(this.viewWrapper, temp);
17023
17032
  remaining = this.value.length - index;
17024
17033
  wrapperleng = this.viewWrapper.offsetWidth +
17025
- parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
17034
+ parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10) +
17035
+ parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft, 10);
17026
17036
  while (((wrapperleng + remainSize + downIconWidth + this.clearIconWidth) > overAllContainer) && wrapperleng !== 0
17027
17037
  && this.viewWrapper.innerHTML !== '') {
17028
17038
  const textArr = [];
17029
17039
  this.viewWrapper.innerHTML = textArr.join(this.delimiterChar);
17030
17040
  remaining = this.value.length;
17031
17041
  wrapperleng = this.viewWrapper.offsetWidth +
17032
- parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10);
17042
+ parseInt(window.getComputedStyle(this.viewWrapper).paddingRight, 10) +
17043
+ parseInt(window.getComputedStyle(this.viewWrapper).paddingLeft, 10);
17033
17044
  }
17034
17045
  break;
17035
17046
  }
@@ -17059,13 +17070,13 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17059
17070
  }
17060
17071
  checkClearIconWidth() {
17061
17072
  if (this.showClearButton) {
17062
- this.clearIconWidth = this.overAllClear.offsetWidth;
17073
+ this.clearIconWidth = parseInt(window.getComputedStyle(this.overAllClear).width, 10);
17063
17074
  }
17064
17075
  }
17065
17076
  updateRemainWidth(viewWrapper, totalWidth) {
17066
17077
  if (viewWrapper.classList.contains(TOTAL_COUNT_WRAPPER$1) && totalWidth < (viewWrapper.offsetWidth +
17067
17078
  parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10)
17068
- + parseInt(window.getComputedStyle(viewWrapper).paddingLeft, 10))) {
17079
+ + parseInt(window.getComputedStyle(viewWrapper).paddingRight, 10))) {
17069
17080
  viewWrapper.style.width = totalWidth + 'px';
17070
17081
  }
17071
17082
  }
@@ -17324,6 +17335,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17324
17335
  li[index - 1].classList.remove('e-item-focus');
17325
17336
  }
17326
17337
  }
17338
+ this.checkSelectAll();
17327
17339
  }, 0);
17328
17340
  }
17329
17341
  }
@@ -17350,6 +17362,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
17350
17362
  });
17351
17363
  }
17352
17364
  }
17365
+ this.checkSelectAll();
17353
17366
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
17354
17367
  const virtualTrackElement = this.list.getElementsByClassName('e-virtual-ddl')[0];
17355
17368
  if (virtualTrackElement) {