@syncfusion/ej2-splitbuttons 32.2.3 → 32.2.7

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.
@@ -354,7 +354,15 @@ var DropDownButton = /** @__PURE__ @class */ (function (_super) {
354
354
  className: this.popupWidth !== 'auto' ? classNames.POPUP + " " + classNames.POPUPWIDTH : classNames.POPUP,
355
355
  id: this.element.id + '-popup'
356
356
  });
357
- document.body.appendChild(div);
357
+ var appendToElement = document.body;
358
+ if (this.isAngular) {
359
+ var cdkPane = this.element.closest('.cdk-overlay-pane');
360
+ var popoverEl = this.element.closest('[popover]');
361
+ if (cdkPane && popoverEl) {
362
+ appendToElement = cdkPane;
363
+ }
364
+ }
365
+ appendToElement.appendChild(div);
358
366
  this.dropDown = new Popup(div, {
359
367
  width: this.popupWidth,
360
368
  relateTo: this.element,
@@ -1374,6 +1382,9 @@ var SplitButton = /** @__PURE__ @class */ (function (_super) {
1374
1382
  };
1375
1383
  this.secondaryBtnObj = new DropDownButton(dropDownBtnModel);
1376
1384
  this.secondaryBtnObj.createElement = this.createElement;
1385
+ if (this.isAngular) {
1386
+ this.secondaryBtnObj.isAngular = this.isAngular;
1387
+ }
1377
1388
  this.secondaryBtnObj.appendTo(btnElem);
1378
1389
  if (!this.createPopupOnClick) {
1379
1390
  this.secondaryBtnObj.dropDown.relateTo = this.wrapper;
@@ -1434,6 +1445,9 @@ var SplitButton = /** @__PURE__ @class */ (function (_super) {
1434
1445
  }
1435
1446
  this.unWireEvents();
1436
1447
  }
1448
+ else if (this.wrapper && this.wrapper.tagName === TAGNAME) {
1449
+ this.unWireEvents();
1450
+ }
1437
1451
  }
1438
1452
  this.primaryBtnObj.destroy();
1439
1453
  this.secondaryBtnObj.destroy();