@syncfusion/ej2-querybuilder 22.2.5 → 22.2.8

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.
@@ -183,6 +183,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
183
183
  _this.isFieldClose = false;
184
184
  _this.isDestroy = false;
185
185
  _this.isGetNestedData = false;
186
+ _this.isCustomOprCols = [];
186
187
  MultiSelect.Inject(CheckBoxSelection);
187
188
  return _this;
188
189
  }
@@ -252,7 +253,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
252
253
  this.columnSort();
253
254
  var columns = this.columns;
254
255
  for (var i = 0, len = columns.length; i < len; i++) {
255
- this.updateCustomOperator(columns[i]);
256
+ this.updateCustomOperator(columns[i], "initial");
256
257
  if (!columns[i].type) {
257
258
  if (columnKeys.indexOf(columns[i].field) > -1) {
258
259
  value = this.dataColl[0][columns[i].field];
@@ -281,7 +282,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
281
282
  if (categories.indexOf(columns[i].category) < 0) {
282
283
  categories.push(columns[i].category);
283
284
  }
284
- if (!columns[i].operators || this.isLocale) {
285
+ if (!columns[i].operators || (this.isLocale && this.isCustomOprCols.indexOf(columns[i].field) !== 0)) {
285
286
  columns[i].operators = this.customOperators[columns[i].type + 'Operator'];
286
287
  }
287
288
  }
@@ -379,8 +380,11 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
379
380
  }
380
381
  }
381
382
  };
382
- QueryBuilder.prototype.updateCustomOperator = function (column) {
383
+ QueryBuilder.prototype.updateCustomOperator = function (column, from) {
383
384
  if (column.operators) {
385
+ if (!this.isLocale && from === "initial" && !isNullOrUndefined(this.isCustomOprCols)) {
386
+ this.isCustomOprCols.push(column.field);
387
+ }
384
388
  var _loop_1 = function (j) {
385
389
  var sqlIdx = Object.keys(column.operators[j]).indexOf('sqlOperator');
386
390
  if (sqlIdx > -1) {