@syncfusion/ej2-querybuilder 21.2.4 → 22.1.34

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.
@@ -2055,7 +2055,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
2055
2055
  getValue(template.write, window)({ elements: tempElements.length > 1 ? tempElements : tempElements[0], values: rule.value,
2056
2056
  operator: tempRule.operator, field: column.field, dataSource: column.values });
2057
2057
  }
2058
- else {
2058
+ else if (typeof itemData.template !== 'function') {
2059
2059
  itemData.template.write({ elements: tempElements.length > 1 ? tempElements : tempElements[0],
2060
2060
  values: rule.value, operator: tempRule.operator, field: column.field, dataSource: column.values });
2061
2061
  }
@@ -2547,7 +2547,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
2547
2547
  QueryBuilder.prototype.actionBeginSuccessCallBack = function (args, itemData, ruleID, field, target) {
2548
2548
  if (args.renderTemplate) {
2549
2549
  var valElem = void 0;
2550
- this.columnTemplateFn = this.templateParser(itemData.template);
2550
+ this.columnTemplateFn = this.templateParser(typeof itemData.template === 'function' ? itemData.template : itemData.template);
2551
2551
  var templateID = this.element.id + field;
2552
2552
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2553
2553
  if (this.isReact) {
@@ -3418,7 +3418,7 @@ var QueryBuilder = /** @__PURE__ @class */ (function (_super) {
3418
3418
  QueryBuilder.prototype.templateParser = function (template) {
3419
3419
  if (template) {
3420
3420
  try {
3421
- if (document.querySelectorAll(template).length) {
3421
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
3422
3422
  return compile(document.querySelector(template).innerHTML.trim());
3423
3423
  }
3424
3424
  else {