@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.
@@ -313,7 +313,15 @@ let DropDownButton = class DropDownButton extends Component {
313
313
  className: this.popupWidth !== 'auto' ? `${classNames.POPUP} ${classNames.POPUPWIDTH}` : classNames.POPUP,
314
314
  id: this.element.id + '-popup'
315
315
  });
316
- document.body.appendChild(div);
316
+ let appendToElement = document.body;
317
+ if (this.isAngular) {
318
+ const cdkPane = this.element.closest('.cdk-overlay-pane');
319
+ const popoverEl = this.element.closest('[popover]');
320
+ if (cdkPane && popoverEl) {
321
+ appendToElement = cdkPane;
322
+ }
323
+ }
324
+ appendToElement.appendChild(div);
317
325
  this.dropDown = new Popup(div, {
318
326
  width: this.popupWidth,
319
327
  relateTo: this.element,
@@ -1309,6 +1317,9 @@ let SplitButton = class SplitButton extends DropDownButton {
1309
1317
  };
1310
1318
  this.secondaryBtnObj = new DropDownButton(dropDownBtnModel);
1311
1319
  this.secondaryBtnObj.createElement = this.createElement;
1320
+ if (this.isAngular) {
1321
+ this.secondaryBtnObj.isAngular = this.isAngular;
1322
+ }
1312
1323
  this.secondaryBtnObj.appendTo(btnElem);
1313
1324
  if (!this.createPopupOnClick) {
1314
1325
  this.secondaryBtnObj.dropDown.relateTo = this.wrapper;
@@ -1368,6 +1379,9 @@ let SplitButton = class SplitButton extends DropDownButton {
1368
1379
  }
1369
1380
  this.unWireEvents();
1370
1381
  }
1382
+ else if (this.wrapper && this.wrapper.tagName === TAGNAME) {
1383
+ this.unWireEvents();
1384
+ }
1371
1385
  }
1372
1386
  this.primaryBtnObj.destroy();
1373
1387
  this.secondaryBtnObj.destroy();