TSK-642 - Remove flickering from classification onSaving a new one

This commit is contained in:
Jose Ignacio Recuerda Cambil 2018-07-30 16:12:44 +02:00 committed by Martin Rojas Miguel Angel
parent b335bb02f5
commit 5e4a681de4
1 changed files with 3 additions and 1 deletions

View File

@ -92,6 +92,7 @@ export class ClassificationDetailsComponent implements OnInit, OnDestroy {
})
this.classificationSelectedSubscription = this.classificationsService.getSelectedClassification()
.subscribe(classificationSelected => {
if (this.classification && this.classification.classificationId === classificationSelected.classificationId) { return; }
this.initProperties();
if (classificationSelected) {
this.fillClassificationInformation(classificationSelected);
@ -111,7 +112,8 @@ export class ClassificationDetailsComponent implements OnInit, OnDestroy {
this.fillClassificationInformation(this.selectedClassification ? this.selectedClassification : new ClassificationDefinition())
}
if (id && id !== '') {
if (!this.classification || this.classification.classificationId !== id && id && id !== '') {
this.selectClassification(id);
}
});