Fix a transition initilization after deleting a subcategory
This commit is contained in:
parent
3d6cbf8b3e
commit
c1bc7b6a5a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue