@syncfusion/ej2-lists 19.3.43 → 19.3.53

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.
@@ -213,7 +213,8 @@ var ListBase;
213
213
  options, level, isSingleLevel, componentInstance) {
214
214
  const curOpt = extend({}, defaultListBaseOptions, options);
215
215
  cssClass = getModuleClass(curOpt.moduleName);
216
- const fields = extend({}, ListBase.defaultMappedFields, curOpt.fields);
216
+ const fields = (componentInstance &&
217
+ (componentInstance.getModuleName() == "listview" || componentInstance.getModuleName() == "multiselect")) ? curOpt.fields : extend({}, ListBase.defaultMappedFields, curOpt.fields);
217
218
  const ariaAttributes = extend({}, defaultAriaAttributes, curOpt.ariaAttributes);
218
219
  let id;
219
220
  let checkboxElement = [];
@@ -633,17 +634,27 @@ var ListBase;
633
634
  else {
634
635
  const currentID = isHeader ? curOpt.groupTemplateID : curOpt.templateID;
635
636
  if (isHeader) {
636
- // eslint-disable-next-line
637
- const compiledElement = compiledString(curItem, componentInstance, 'headerTemplate', currentID, !!curOpt.isStringTemplate, null, li);
638
- if (compiledElement) {
639
- append(compiledElement, li);
637
+ if (componentInstance && componentInstance.getModuleName() !== 'listview') {
638
+ // eslint-disable-next-line
639
+ const compiledElement = compiledString(curItem, componentInstance, 'headerTemplate', currentID, !!curOpt.isStringTemplate, null, li);
640
+ if (compiledElement) {
641
+ append(compiledElement, li);
642
+ }
643
+ }
644
+ else {
645
+ append(compiledString(curItem, componentInstance, 'headerTemplate', currentID, !!curOpt.isStringTemplate), li);
640
646
  }
641
647
  }
642
648
  else {
643
- // eslint-disable-next-line
644
- const compiledElement = compiledString(curItem, componentInstance, 'template', currentID, !!curOpt.isStringTemplate, null, li);
645
- if (compiledElement) {
646
- append(compiledElement, li);
649
+ if (componentInstance && componentInstance.getModuleName() !== 'listview') {
650
+ // eslint-disable-next-line
651
+ const compiledElement = compiledString(curItem, componentInstance, 'template', currentID, !!curOpt.isStringTemplate, null, li);
652
+ if (compiledElement) {
653
+ append(compiledElement, li);
654
+ }
655
+ }
656
+ else {
657
+ append(compiledString(curItem, componentInstance, 'template', currentID, !!curOpt.isStringTemplate), li);
647
658
  }
648
659
  }
649
660
  li.setAttribute('data-value', isNullOrUndefined(value) ? 'null' : value);
@@ -690,10 +701,15 @@ var ListBase;
690
701
  const headerData = {};
691
702
  headerData[category] = header.textContent;
692
703
  header.innerHTML = '';
693
- // eslint-disable-next-line
694
- const compiledElement = compiledString(headerData, componentInstance, 'groupTemplate', curOpt.groupTemplateID, !!curOpt.isStringTemplate, null, header);
695
- if (compiledElement) {
696
- append(compiledElement, header);
704
+ if (componentInstance && componentInstance.getModuleName() !== 'listview') {
705
+ // eslint-disable-next-line
706
+ const compiledElement = compiledString(headerData, componentInstance, 'groupTemplate', curOpt.groupTemplateID, !!curOpt.isStringTemplate, null, header);
707
+ if (compiledElement) {
708
+ append(compiledElement, header);
709
+ }
710
+ }
711
+ else {
712
+ append(compiledString(headerData, componentInstance, 'groupTemplate', curOpt.groupTemplateID, !!curOpt.isStringTemplate), header);
697
713
  }
698
714
  }
699
715
  return headerItems;
@@ -869,19 +885,29 @@ var ListBase;
869
885
  if (grpLI && options && options.groupTemplate) {
870
886
  // eslint-disable-next-line @typescript-eslint/ban-types
871
887
  const compiledString = compileTemplate(options.groupTemplate);
872
- // eslint-disable-next-line
873
- const compiledElement = compiledString(item, componentInstance, 'groupTemplate', curOpt.groupTemplateID, !!curOpt.isStringTemplate, null, li);
874
- if (compiledElement) {
875
- append(compiledElement, li);
888
+ if (componentInstance && componentInstance.getModuleName() !== 'listview') {
889
+ // eslint-disable-next-line
890
+ const compiledElement = compiledString(item, componentInstance, 'groupTemplate', curOpt.groupTemplateID, !!curOpt.isStringTemplate, null, li);
891
+ if (compiledElement) {
892
+ append(compiledElement, li);
893
+ }
894
+ }
895
+ else {
896
+ append(compiledString(item, componentInstance, 'groupTemplate', curOpt.groupTemplateID, !!curOpt.isStringTemplate), li);
876
897
  }
877
898
  }
878
899
  else if (!grpLI && options && options.template) {
879
900
  // eslint-disable-next-line @typescript-eslint/ban-types
880
901
  const compiledString = compileTemplate(options.template);
881
- // eslint-disable-next-line
882
- const compiledElement = compiledString(item, componentInstance, 'template', curOpt.templateID, !!curOpt.isStringTemplate, null, li);
883
- if (compiledElement) {
884
- append(compiledElement, li);
902
+ if (componentInstance && componentInstance.getModuleName() !== 'listview') {
903
+ // eslint-disable-next-line
904
+ const compiledElement = compiledString(item, componentInstance, 'template', curOpt.templateID, !!curOpt.isStringTemplate, null, li);
905
+ if (compiledElement) {
906
+ append(compiledElement, li);
907
+ }
908
+ }
909
+ else {
910
+ append(compiledString(item, componentInstance, 'template', curOpt.templateID, !!curOpt.isStringTemplate), li);
885
911
  }
886
912
  }
887
913
  else {