@syncfusion/ej2-querybuilder 32.2.4 → 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.
@@ -4184,6 +4184,29 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
4184
4184
  if (this.portals && this.portals.length) {
4185
4185
  this.clearQBTemplate();
4186
4186
  }
4187
+ var qbDdlElems = this.element.querySelectorAll('.qb-dropdownlist');
4188
+ if (!qbDdlElems || qbDdlElems.length === 0) {
4189
+ qbDdlElems = document.querySelectorAll('.qb-dropdownlist');
4190
+ }
4191
+ for (i = 0; i < qbDdlElems.length; i++) {
4192
+ var ddlElem = qbDdlElems[i];
4193
+ var targetInput = ddlElem.tagName === 'INPUT' ? ddlElem : ddlElem.querySelector('input');
4194
+ if (targetInput) {
4195
+ var ddlInst = getComponent(targetInput, 'dropdownlist');
4196
+ if (ddlInst) {
4197
+ if (ddlInst.close) {
4198
+ ddlInst.close = null;
4199
+ }
4200
+ if (ddlInst.open) {
4201
+ ddlInst.open = null;
4202
+ }
4203
+ if (ddlInst.change) {
4204
+ ddlInst.change = null;
4205
+ }
4206
+ ddlInst.destroy();
4207
+ }
4208
+ }
4209
+ }
4187
4210
  var popupElement = document.querySelectorAll('.qb-dropdownlist.e-popup');
4188
4211
  if (popupElement) {
4189
4212
  for (i = 0; i < popupElement.length; i++) {
@@ -5152,7 +5175,8 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
5152
5175
  if (this.allowDragAndDrop) {
5153
5176
  EventHandler.add(document, 'keydown', this.keyBoardHandler, this);
5154
5177
  }
5155
- window.addEventListener('resize', this.windowResizeHandler.bind(this));
5178
+ this.boundResizeHandler = this.windowResizeHandler.bind(this);
5179
+ window.addEventListener('resize', this.boundResizeHandler);
5156
5180
  };
5157
5181
  QueryBuilder.prototype.unWireEvents = function () {
5158
5182
  var wrapper = this.getWrapper();
@@ -5161,7 +5185,10 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
5161
5185
  EventHandler.remove(wrapper, 'focusin', this.focusEventHandler);
5162
5186
  EventHandler.remove(this.element, 'keydown', this.keyBoardHandler);
5163
5187
  EventHandler.remove(document, 'keydown', this.keyBoardHandler);
5164
- window.removeEventListener('resize', this.windowResizeHandler);
5188
+ if (this.boundResizeHandler) {
5189
+ window.removeEventListener('resize', this.boundResizeHandler);
5190
+ this.boundResizeHandler = null;
5191
+ }
5165
5192
  };
5166
5193
  QueryBuilder.prototype.getParentGroup = function (target, isParent) {
5167
5194
  var groupLevel = (target instanceof Element) ? this.levelColl[target.id] : this.levelColl["" + target];