@syncfusion/ej2-querybuilder 25.1.35 → 25.1.37

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.
@@ -2183,17 +2183,11 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
2183
2183
  if (!this.dataColl.length && values.length) {
2184
2184
  isValues = true;
2185
2185
  }
2186
- var fieldValue = this.selectedRule.field;
2187
- var isNested = this.selectedRule.field.indexOf(this.separator);
2188
- if (isNested !== 0 && this.fieldMode !== 'DropdownTree') {
2189
- var nest = this.selectedRule.field.split(this.separator);
2190
- fieldValue = nest[nest.length - 1];
2191
- }
2192
2186
  var multiSelectValue;
2193
2187
  multiSelectValue = {
2194
2188
  dataSource: isValues ? values : (isFetched ? ds : this.dataManager),
2195
2189
  query: new Query([rule.field]),
2196
- fields: { text: fieldValue, value: fieldValue },
2190
+ fields: { text: this.selectedRule.field, value: this.selectedRule.field },
2197
2191
  placeholder: this.l10n.getConstant('SelectValue'),
2198
2192
  value: selectedValue,
2199
2193
  mode: 'CheckBox',
@@ -5118,6 +5112,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
5118
5112
  */
5119
5113
  QueryBuilder.prototype.cloneRule = function (ruleID, groupID, index) {
5120
5114
  var getRule = this.getRule(ruleID.replace(this.element.id + '_', ''));
5115
+ var isCloneRule = this.showButtons.cloneRule;
5121
5116
  groupID = groupID.replace(this.element.id + '_', '');
5122
5117
  this.ruleIndex = index;
5123
5118
  this.cloneRuleBtnClick = true;
@@ -5128,7 +5123,8 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
5128
5123
  }], groupID);
5129
5124
  this.ruleIndex = -1;
5130
5125
  this.cloneRuleBtnClick = false;
5131
- this.showButtons.cloneRule = false;
5126
+ this.showButtons.cloneRule = isCloneRule;
5127
+ isCloneRule = false;
5132
5128
  };
5133
5129
  /**
5134
5130
  * Clones the group based on the group ID to the specific group.
@@ -5141,6 +5137,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
5141
5137
  QueryBuilder.prototype.cloneGroup = function (groupID, parentGroupID, index) {
5142
5138
  parentGroupID = parentGroupID.replace(this.element.id + '_', '');
5143
5139
  var group = this.getGroup(parentGroupID);
5140
+ var isCloneGroup = this.showButtons.cloneGroup;
5144
5141
  groupID = groupID.replace(this.element.id + '_', '');
5145
5142
  this.groupIndex = index;
5146
5143
  this.cloneGrpBtnClick = true;
@@ -5148,7 +5145,8 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
5148
5145
  this.addGroups([{ 'condition': group.condition, 'not': group.not, 'rules': group.rules }], groupID);
5149
5146
  this.groupIndex = -1;
5150
5147
  this.cloneGrpBtnClick = false;
5151
- this.showButtons.cloneGroup = false;
5148
+ this.showButtons.cloneGroup = isCloneGroup;
5149
+ isCloneGroup = false;
5152
5150
  };
5153
5151
  /**
5154
5152
  * Locks the rule based on the rule ID.
@@ -5157,6 +5155,9 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
5157
5155
  * @returns {void}
5158
5156
  */
5159
5157
  QueryBuilder.prototype.lockRule = function (ruleID) {
5158
+ if (ruleID.indexOf(this.element.id) < 0) {
5159
+ ruleID = this.element.id + '_' + ruleID;
5160
+ }
5160
5161
  var target = document.getElementById(ruleID).querySelectorAll('.e-lock-rule-btn')[0];
5161
5162
  this.ruleLock(target);
5162
5163
  };
@@ -5167,6 +5168,9 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
5167
5168
  * @returns {void}
5168
5169
  */
5169
5170
  QueryBuilder.prototype.lockGroup = function (groupID) {
5171
+ if (groupID.indexOf(this.element.id) < 0) {
5172
+ groupID = this.element.id + '_' + groupID;
5173
+ }
5170
5174
  var target = document.getElementById(groupID).querySelectorAll('.e-lock-grp-btn')[0];
5171
5175
  this.groupLock(target);
5172
5176
  };