@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.
@@ -1993,7 +1993,7 @@ let QueryBuilder = class QueryBuilder extends Component {
1993
1993
  getValue(template.write, window)({ elements: tempElements.length > 1 ? tempElements : tempElements[0], values: rule.value,
1994
1994
  operator: tempRule.operator, field: column.field, dataSource: column.values });
1995
1995
  }
1996
- else {
1996
+ else if (typeof itemData.template !== 'function') {
1997
1997
  itemData.template.write({ elements: tempElements.length > 1 ? tempElements : tempElements[0],
1998
1998
  values: rule.value, operator: tempRule.operator, field: column.field, dataSource: column.values });
1999
1999
  }
@@ -2484,7 +2484,7 @@ let QueryBuilder = class QueryBuilder extends Component {
2484
2484
  actionBeginSuccessCallBack(args, itemData, ruleID, field, target) {
2485
2485
  if (args.renderTemplate) {
2486
2486
  let valElem;
2487
- this.columnTemplateFn = this.templateParser(itemData.template);
2487
+ this.columnTemplateFn = this.templateParser(typeof itemData.template === 'function' ? itemData.template : itemData.template);
2488
2488
  const templateID = this.element.id + field;
2489
2489
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2490
2490
  if (this.isReact) {
@@ -3354,7 +3354,7 @@ let QueryBuilder = class QueryBuilder extends Component {
3354
3354
  templateParser(template) {
3355
3355
  if (template) {
3356
3356
  try {
3357
- if (document.querySelectorAll(template).length) {
3357
+ if (typeof template !== 'function' && document.querySelectorAll(template).length) {
3358
3358
  return compile(document.querySelector(template).innerHTML.trim());
3359
3359
  }
3360
3360
  else {