@syncfusion/ej2-dropdowns 28.2.4 → 28.2.5

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.
@@ -5299,6 +5299,7 @@ let DropDownList = class DropDownList extends DropDownBase {
5299
5299
  }
5300
5300
  const args = { cancel: false };
5301
5301
  this.trigger('beforeOpen', args, (args) => {
5302
+ let initialPopupHeight;
5302
5303
  if (!args.cancel) {
5303
5304
  const popupEle = this.createElement('div', {
5304
5305
  id: this.element.id + '_popup', className: 'e-ddl e-popup ' + (this.cssClass !== null ? this.cssClass : '')
@@ -5319,6 +5320,7 @@ let DropDownList = class DropDownList extends DropDownBase {
5319
5320
  }
5320
5321
  document.body.appendChild(popupEle);
5321
5322
  popupEle.style.top = '0px';
5323
+ initialPopupHeight = popupEle.clientHeight;
5322
5324
  if (this.enableVirtualization && this.itemTemplate) {
5323
5325
  const listitems = popupEle.querySelectorAll('li.e-list-item:not(.e-virtual-list)');
5324
5326
  this.listItemHeight = listitems.length > 0 ? Math.ceil(listitems[0].getBoundingClientRect().height) +
@@ -5515,7 +5517,7 @@ let DropDownList = class DropDownList extends DropDownBase {
5515
5517
  // Add the resizer div to the popup
5516
5518
  if (this.list && this.list.parentElement) {
5517
5519
  this.list.parentElement.classList.add('e-resize');
5518
- if (this.popupHeight.toString().toLowerCase() !== 'auto') {
5520
+ if (this.popupHeight.toString().toLowerCase() !== 'auto' && initialPopupHeight > parseInt(this.popupHeight.toString(), 10)) {
5519
5521
  this.list.parentElement.style.height = '100%';
5520
5522
  }
5521
5523
  this.list.parentElement.style.paddingBottom = (this.getModuleName() === 'dropdownlist' && this.allowFiltering && this.searchBoxHeight) ? (this.searchBoxHeight + resizePaddingBottom).toString() + 'px' : resizePaddingBottom.toString() + 'px';
@@ -8496,7 +8498,7 @@ let DropDownTree = class DropDownTree extends Component {
8496
8498
  this.inputEle.setAttribute('aria-label', this.getModuleName());
8497
8499
  const id = this.element.getAttribute('id');
8498
8500
  this.hiddenElement.id = id + '_hidden';
8499
- this.inputWrapper.setAttribute('tabindex', '0');
8501
+ this.inputWrapper.setAttribute('tabindex', this.inputWrapper.classList.contains('e-disabled') ? '-1' : '0');
8500
8502
  this.inputWrapper.setAttribute('aria-label', this.getModuleName());
8501
8503
  attributes(this.inputWrapper, this.getAriaAttributes());
8502
8504
  }
@@ -8856,9 +8858,11 @@ let DropDownTree = class DropDownTree extends Component {
8856
8858
  removeClass([this.popupEle], DDTHIDEICON);
8857
8859
  this.updatePopupHeight();
8858
8860
  this.popupObj.refreshPosition();
8859
- if (!(this.showCheckBox && this.showSelectAll) && (!this.popupDiv.classList.contains(NODATA)
8860
- && this.treeItems.length > 0)) {
8861
- let focusedElement = this.value != null && this.text != null ? this.treeObj.element.querySelector('[data-uid="' + this.value[0] + '"]') : null;
8861
+ if (this.showSelectAll && !this.allowFiltering) {
8862
+ this.checkAllParent.focus();
8863
+ }
8864
+ if ((!this.popupDiv.classList.contains(NODATA) && this.treeItems.length > 0)) {
8865
+ let focusedElement = this.value != null || this.text != null ? this.treeObj.element.querySelector('[data-uid="' + this.value[0] + '"]') : null;
8862
8866
  if (focusedElement) {
8863
8867
  this.treeObj.element.querySelector('li').setAttribute('tabindex', '-1');
8864
8868
  focusedElement.setAttribute('tabindex', '0');
@@ -9197,7 +9201,9 @@ let DropDownTree = class DropDownTree extends Component {
9197
9201
  this.updateTemplate();
9198
9202
  }
9199
9203
  this.treeObj.fields = this.getTreeFields(this.fields);
9204
+ this.setProperties({ value: this.oldValue }, true);
9200
9205
  this.treeObj.dataBind();
9206
+ this.updateValue(this.value);
9201
9207
  }
9202
9208
  getEventArgs(args) {
9203
9209
  const checkData = args.data;
@@ -10208,8 +10214,10 @@ let DropDownTree = class DropDownTree extends Component {
10208
10214
  this.updateFilterPlaceHolder();
10209
10215
  break;
10210
10216
  case 'value':
10211
- this.oldValue = oldProp.value;
10212
- this.updateValue(newProp.value);
10217
+ if (JSON.stringify(oldProp.value) !== JSON.stringify(newProp.value)) {
10218
+ this.oldValue = oldProp.value;
10219
+ this.updateValue(newProp.value);
10220
+ }
10213
10221
  break;
10214
10222
  case 'text':
10215
10223
  this.updateText(newProp.text);