@syncfusion/ej2-splitbuttons 19.4.47 → 19.4.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.
@@ -1,4 +1,4 @@
1
- import { Animation, ChildProperty, Collection, Complex, Component, Event, EventHandler, KeyboardEvents, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, attributes, classList, closest, createElement, deleteObject, detach, extend, getInstance, getUniqueID, getValue, isNullOrUndefined, remove, removeClass, rippleEffect, select, setValue } from '@syncfusion/ej2-base';
1
+ import { Animation, ChildProperty, Collection, Complex, Component, Event, EventHandler, KeyboardEvents, NotifyPropertyChanges, Property, SanitizeHtmlHelper, addClass, attributes, classList, closest, createElement, deleteObject, detach, extend, getComponent, getInstance, getUniqueID, getValue, isNullOrUndefined, remove, removeClass, rippleEffect, select, setValue } from '@syncfusion/ej2-base';
2
2
  import { Button } from '@syncfusion/ej2-buttons';
3
3
  import { Popup, createSpinner, hideSpinner, showSpinner } from '@syncfusion/ej2-popups';
4
4
 
@@ -635,9 +635,25 @@ let DropDownButton = class DropDownButton extends Component {
635
635
  }
636
636
  }
637
637
  openPopUp(e = null) {
638
+ const popupElem = this.getPopUpElement();
638
639
  if (!this.target) {
639
640
  this.createItems(true);
640
641
  }
642
+ else {
643
+ if (this.activeElem.length > 1) {
644
+ let splitButton = getComponent(this.activeElem[0], 'split-btn');
645
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
646
+ if (splitButton.isReact && popupElem.childNodes.length < 1) {
647
+ splitButton.appendReactElement(this.getTargetElement(), this.getPopUpElement());
648
+ }
649
+ }
650
+ else {
651
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
652
+ if (this.isReact && popupElem.childNodes.length < 1) {
653
+ this.appendReactElement(this.getTargetElement(), this.getPopUpElement());
654
+ }
655
+ }
656
+ }
641
657
  const ul = this.getULElement();
642
658
  this.popupWireEvents();
643
659
  const beforeOpenArgs = { element: ul, items: this.items, event: e, cancel: false };