@syncfusion/ej2-navigations 20.2.44 → 20.2.48

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.
@@ -2568,10 +2568,7 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2568
2568
  }
2569
2569
  var navIdx = this.getIndex(idx, isUniqueId);
2570
2570
  var newItem = this.getItem(navIdx);
2571
- newItem.iconCss = item.iconCss || newItem.iconCss;
2572
- newItem.text = item.text || newItem.text;
2573
- newItem.url = item.url || newItem.url;
2574
- newItem.separator = item.separator || newItem.separator;
2571
+ Object.assign(newItem, item);
2575
2572
  };
2576
2573
  MenuBase.prototype.getItem = function (navIdx) {
2577
2574
  navIdx = navIdx.slice();
@@ -2695,6 +2692,14 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2695
2692
  var item = void 0;
2696
2693
  if (!Object.keys(oldProp.items).length) {
2697
2694
  this_1.updateItem(this_1.element, this_1.items);
2695
+ if (this_1.enableScrolling && this_1.element.parentElement.classList.contains('e-custom-scroll')) {
2696
+ if (this_1.element.classList.contains('e-vertical')) {
2697
+ addScrolling(this_1.createElement, wrapper, this_1.element, 'vscroll', this_1.enableRtl);
2698
+ }
2699
+ else {
2700
+ addScrolling(this_1.createElement, wrapper, this_1.element, 'hscroll', this_1.enableRtl);
2701
+ }
2702
+ }
2698
2703
  if (!this_1.hamburgerMode) {
2699
2704
  for (var i = 1, count = wrapper.childElementCount; i < count; i++) {
2700
2705
  detach(wrapper.lastElementChild);
@@ -2716,14 +2721,6 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2716
2721
  navIdx.length = 0;
2717
2722
  }
2718
2723
  }
2719
- if (this_1.enableScrolling) {
2720
- if (this_1.element.classList.contains('e-vertical')) {
2721
- addScrolling(this_1.createElement, wrapper, this_1.element, 'vscroll', this_1.enableRtl);
2722
- }
2723
- else {
2724
- addScrolling(this_1.createElement, wrapper, this_1.element, 'hscroll', this_1.enableRtl);
2725
- }
2726
- }
2727
2724
  break;
2728
2725
  }
2729
2726
  }
@@ -2739,6 +2736,16 @@ var MenuBase = /** @__PURE__ @class */ (function (_super) {
2739
2736
  ul = this.removeChildElement(ul);
2740
2737
  }
2741
2738
  else {
2739
+ if (this.enableScrolling) {
2740
+ var wrapper1 = this.getWrapper();
2741
+ var ul1 = wrapper1.children[0];
2742
+ if (this.element.classList.contains('e-vertical')) {
2743
+ destroyScroll(getInstance(ul1, VScroll), ul1);
2744
+ }
2745
+ else {
2746
+ destroyScroll(getInstance(ul1, HScroll), ul1);
2747
+ }
2748
+ }
2742
2749
  ul.innerHTML = '';
2743
2750
  }
2744
2751
  var lis = [].slice.call(this.createItems(items).children);