Compare commits
2 Commits
bfaa8f8a53
...
eda508a65c
Author | SHA1 | Date |
---|---|---|
Sofia Papacharalampous | eda508a65c | |
Sofia Papacharalampous | c2c493d896 |
|
@ -1131,12 +1131,14 @@ export class DescriptionEditorComponent extends BaseEditor<DescriptionEditorMode
|
|||
|
||||
getNestedSectionIdsByField(section: DescriptionTemplateSection, fieldSetId: string): string[] {
|
||||
if (section.sections) {
|
||||
return [section.id, ...section.sections.flatMap((subsection: DescriptionTemplateSection) => this.getNestedSectionIdsByField(subsection, fieldSetId))];
|
||||
const subNestedSectionIds: string[] = section.sections.flatMap((subsection: DescriptionTemplateSection) => this.getNestedSectionIdsByField(subsection, fieldSetId))
|
||||
if (subNestedSectionIds.length > 0) return [section.id, ...subNestedSectionIds];
|
||||
// return [section.id, ...section.sections.flatMap((subsection: DescriptionTemplateSection) => this.getNestedSectionIdsByField(subsection, fieldSetId))];
|
||||
}
|
||||
|
||||
else if (section.fieldSets.find(fieldSet => fieldSet.id == fieldSetId)) return [section.id];
|
||||
|
||||
else return [];
|
||||
return [];
|
||||
}
|
||||
|
||||
// // this._listenersSubscription.add(dmpSubscription);
|
||||
|
|
Loading…
Reference in New Issue