@syncfusion/ej2-splitbuttons 20.4.48 → 20.4.50

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.
@@ -805,12 +805,13 @@ let DropDownButton = class DropDownButton extends Component {
805
805
  }
806
806
  break;
807
807
  case 'cssClass':
808
- if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
808
+ if (newProp.cssClass.indexOf(classNames.VERTICAL) > -1 || oldProp.cssClass.indexOf(classNames.VERTICAL) > -1) {
809
809
  if (!this.element.querySelector('span.e-caret')) {
810
810
  this.appendArrowSpan();
811
811
  }
812
812
  const arrowSpan = this.element.querySelector('span.e-caret');
813
- classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right']);
813
+ newProp.cssClass.indexOf(classNames.VERTICAL) > -1 ? classList(arrowSpan, ['e-icon-bottom'], ['e-icon-right'])
814
+ : classList(arrowSpan, ['e-icon-right'], ['e-icon-bottom']);
814
815
  }
815
816
  if (this.isPopupCreated) {
816
817
  if (oldProp.cssClass) {
@@ -1075,6 +1076,10 @@ let SplitButton = class SplitButton extends DropDownButton {
1075
1076
  this.trigger('select', args);
1076
1077
  };
1077
1078
  dropDownBtnModel.beforeOpen = (args) => {
1079
+ if (this.createPopupOnClick && this.items.length == 0) {
1080
+ this.secondaryBtnObj.dropDown.relateTo = this.wrapper;
1081
+ this.dropDown = this.secondaryBtnObj.dropDown;
1082
+ }
1078
1083
  const callBackPromise = new Deferred();
1079
1084
  this.trigger('beforeOpen', args, (observedArgs) => {
1080
1085
  callBackPromise.resolve(observedArgs);