@syncfusion/ej2-querybuilder 32.2.9 → 33.1.46

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.
@@ -1419,10 +1419,9 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
1419
1419
  if (rule.rules[index].value instanceof Array) {
1420
1420
  valArray = rule.rules[index].value;
1421
1421
  }
1422
- if (excludeOprs.indexOf(rule.rules[index].operator) < -1 &&
1423
- (isNullOrUndefined(rule.rules[index].value) &&
1424
- rule.rules[index].type !== 'date') || rule.rules[index].value === '' || rule.rules[index].value === null ||
1425
- (rule.rules[index].value instanceof Array && valArray.length < 1)) {
1422
+ if (excludeOprs.indexOf(rule.rules[index].operator) < 0 && ((isNullOrUndefined(rule.rules[index].value) &&
1423
+ rule.rules[index].type !== 'date') || rule.rules[index].value === '' || rule.rules[index].value === null ||
1424
+ (rule.rules[index].value instanceof Array && valArray.length < 1))) {
1426
1425
  var valElem = tempElem.querySelectorAll('.e-rule-value .e-control');
1427
1426
  if (excludeOprs.indexOf(rule.rules[index].operator) < 0) {
1428
1427
  isValid = false;
@@ -4204,30 +4203,32 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
4204
4203
  this.clearQBTemplate();
4205
4204
  }
4206
4205
  var qbDdlElems = this.element.querySelectorAll('.qb-dropdownlist');
4207
- if (!qbDdlElems || qbDdlElems.length === 0) {
4208
- qbDdlElems = document.querySelectorAll('.qb-dropdownlist');
4209
- }
4210
- for (i = 0; i < qbDdlElems.length; i++) {
4211
- var ddlElem = qbDdlElems[i];
4212
- var targetInput = ddlElem.tagName === 'INPUT' ? ddlElem : ddlElem.querySelector('input');
4213
- if (targetInput) {
4214
- var ddlInst = getComponent(targetInput, 'dropdownlist');
4215
- if (ddlInst) {
4216
- if (ddlInst.close) {
4217
- ddlInst.close = null;
4218
- }
4219
- if (ddlInst.open) {
4220
- ddlInst.open = null;
4221
- }
4222
- if (ddlInst.change) {
4223
- ddlInst.change = null;
4206
+ if (qbDdlElems && qbDdlElems.length > 0) {
4207
+ for (i = 0; i < qbDdlElems.length; i++) {
4208
+ var ddlElem = qbDdlElems[i];
4209
+ if (this.element.contains(ddlElem)) {
4210
+ var targetInput = ddlElem.tagName === 'INPUT' ? ddlElem : ddlElem.querySelector('input');
4211
+ if (targetInput) {
4212
+ var ddlInst = getComponent(targetInput, 'dropdownlist');
4213
+ if (ddlInst) {
4214
+ if (ddlInst.close) {
4215
+ ddlInst.close = null;
4216
+ }
4217
+ if (ddlInst.open) {
4218
+ ddlInst.open = null;
4219
+ }
4220
+ if (ddlInst.change) {
4221
+ ddlInst.change = null;
4222
+ }
4223
+ ddlInst.destroy();
4224
+ }
4224
4225
  }
4225
- ddlInst.destroy();
4226
4226
  }
4227
4227
  }
4228
4228
  }
4229
- var popupElement = document.querySelectorAll('.qb-dropdownlist.e-popup');
4230
- if (popupElement) {
4229
+ // Cleanup orphaned popup elements
4230
+ var popupElement = this.element.querySelectorAll('.e-popup.e-dropdownlist');
4231
+ if (popupElement && popupElement.length > 0) {
4231
4232
  for (i = 0; i < popupElement.length; i++) {
4232
4233
  popupElement[i].remove();
4233
4234
  }