diff --git a/src/app/topic/topic.component.ts b/src/app/topic/topic.component.ts index 949cbaf..72fb8ca 100644 --- a/src/app/topic/topic.component.ts +++ b/src/app/topic/topic.component.ts @@ -460,15 +460,15 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent { this.subCategoryIndexSubject.next(subcategoryIndex); } - subCategoryChanged(callback: Function, save: boolean = false) { - if(this.subCategories && save) { + subCategoryChanged(callback: Function) { + if(this.subCategories) { this.subCategories.disable(); } if(callback) { callback(); } this.cdr.detectChanges(); - if(this.subCategories && save) { + if(this.subCategories) { this.subCategories.init(); this.subCategories.enable(); } @@ -527,7 +527,7 @@ export class TopicComponent implements OnInit, OnDestroy, IDeactivateComponent { } else { this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index] = HelperFunctions.copy(subCategory); } - }, true); + }); }; if (this.index === -1) { this.save('Subcategory has been successfully created', path, this.form.value, callback);