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