@syncfusion/ej2-navigations 33.1.49 → 33.2.4

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.
@@ -3954,7 +3954,10 @@ let Toolbar = class Toolbar extends Component {
3954
3954
  }
3955
3955
  destroyItems() {
3956
3956
  if (this.element) {
3957
- [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach((el) => { detach(el); });
3957
+ [].slice.call(this.element.querySelectorAll('.' + CLS_ITEM)).forEach((el) => {
3958
+ EventHandler.remove(el, 'click', this.itemClick);
3959
+ detach(el);
3960
+ });
3958
3961
  }
3959
3962
  if (this.tbarAlign) {
3960
3963
  const tbarItems = this.element.querySelector('.' + CLS_ITEMS);
@@ -5545,6 +5548,7 @@ let Toolbar = class Toolbar extends Component {
5545
5548
  if (!isNullOrUndefined(btnItem) && !isNullOrUndefined(btnItem.ej2_instances[0]) && !(btnItem.ej2_instances[0].isDestroyed)) {
5546
5549
  btnItem.ej2_instances[0].destroy();
5547
5550
  }
5551
+ EventHandler.remove(innerItems[parseInt(index.toString(), 10)], 'click', this.itemClick);
5548
5552
  detach(innerItems[parseInt(index.toString(), 10)]);
5549
5553
  this.items.splice(eleIdx, 1);
5550
5554
  this.tbarEle.splice(eleIdx, 1);
@@ -5688,7 +5692,7 @@ let Toolbar = class Toolbar extends Component {
5688
5692
  dom.setAttribute('aria-label', (item.text || item.tooltipText));
5689
5693
  dom.setAttribute('aria-disabled', 'false');
5690
5694
  innerEle.appendChild(dom);
5691
- innerEle.addEventListener('click', this.itemClick.bind(this));
5695
+ EventHandler.add(innerEle, 'click', this.itemClick, this);
5692
5696
  break;
5693
5697
  case 'Separator':
5694
5698
  this.add(innerEle, CLS_SEPARATOR);
@@ -5930,6 +5934,7 @@ let Toolbar = class Toolbar extends Component {
5930
5934
  if (this.isReact && this.items[parseInt(index.toString(), 10)].template) {
5931
5935
  this.clearToolbarTemplate(itemCol[parseInt(index.toString(), 10)]);
5932
5936
  }
5937
+ EventHandler.remove(itemCol[parseInt(index.toString(), 10)], 'click', this.itemClick);
5933
5938
  detach(itemCol[parseInt(index.toString(), 10)]);
5934
5939
  this.tbarEle.splice(index, 1);
5935
5940
  this.addItems([this.items[parseInt(index.toString(), 10)]], index);
@@ -8864,11 +8869,17 @@ let Tab = class Tab extends Component {
8864
8869
  }
8865
8870
  else if (this.heightAdjustMode === 'Fill') {
8866
8871
  addClass([this.element], [CLS_FILL]);
8867
- const parent = this.element.parentElement;
8868
- const heightVal = parent.style.height || parent.getAttribute('height');
8872
+ let parent = this.element.parentElement;
8873
+ let heightVal = parent.style.height || parent.getAttribute('height');
8874
+ while (parent && !heightVal) {
8875
+ heightVal = parent.style.height || parent.getAttribute('height');
8876
+ if (!heightVal) {
8877
+ parent = parent.parentElement;
8878
+ }
8879
+ }
8869
8880
  setStyleAttribute(this.element, { 'height': heightVal != null ? heightVal : '100%' });
8870
8881
  this.loadContentElement();
8871
- this.cntEle.style.height = heightVal != null ? `calc(${heightVal} - ${this.hdrEle.offsetHeight}px)` : 'calc(100vh - ' + this.hdrEle.offsetHeight + 'px)';
8882
+ this.cntEle.style.height = heightVal != null ? `calc(${heightVal} - ${this.hdrEle.offsetHeight}px)` : 'calc(100vh - ' + (this.hdrEle.offsetHeight + this.hdrEle.scrollHeight) + 'px)';
8872
8883
  }
8873
8884
  else if (this.heightAdjustMode === 'Auto') {
8874
8885
  if (this.isTemplate === true) {