fixed error indication for fields under nested sections
This commit is contained in:
parent
ab1e025a75
commit
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