@syncfusion/ej2-querybuilder 22.1.37 → 22.2.5

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.
@@ -720,7 +720,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
720
720
  placeholder: this.l10n.getConstant('SelectField'), showClearButton: false,
721
721
  popupHeight: ((this.columns.length > 5) ? height : 'auto'), changeOnBlur: false,
722
722
  change: this.changeField.bind(this), value: !isNullOrUndefined(ddlValue) ? [ddlValue] : null,
723
- open: this.popupOpen.bind(this, false)
723
+ open: this.popupOpen.bind(this, false), treeSettings: { expandOn: 'Click' }, select: this.onSelectField
724
724
  };
725
725
  if (this.fieldModel) {
726
726
  ddlField = __assign({}, ddlField, this.fieldModel);
@@ -1394,6 +1394,12 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
1394
1394
  }
1395
1395
  this.isFieldChange = false;
1396
1396
  };
1397
+ QueryBuilder.prototype.onSelectField = function (args) {
1398
+ if (args.itemData.hasChildren) {
1399
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1400
+ this.showPopup();
1401
+ }
1402
+ };
1397
1403
  QueryBuilder.prototype.changeField = function (args) {
1398
1404
  if (args.isInteracted) {
1399
1405
  if (isNullOrUndefined(args.value)) {
@@ -1417,7 +1423,8 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
1417
1423
  }
1418
1424
  else {
1419
1425
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1420
- ddtElem.value = args.oldValue[0];
1426
+ var result = this.getLabelFromColumn(args.oldValue[0]);
1427
+ ddtElem.value = result;
1421
1428
  }
1422
1429
  return;
1423
1430
  }