Seeking assistance with a specific issue. I currently have four labeled tabs, each containing projects. My goal is to ensure that when I save a project, it remains in the same tab where I initiated the save operation, rather than appearing across all tabs. Any guidance on how to achieve this would be greatly appreciated.
<label for="tab-one">PROPOSITIONS
<a class="plus"
(click)="opentestdialog('PROPOSITIONS'); false">+</a>
</label>
<div *ngFor="let project of projects$ | async; let i = index;">
The code above triggers the dialog, written in TypeScript.
opentestdialog(category) {
this.dialog.open(TestdialogComponent, { data: category });
}
Below is the saving process implemented within the dialog.
save() {
if ( this.newProjectName.length > 0) {
this.working = true;
const newProject: Project = emptyProject();
newProject.name = this.newProjectName;
newProject.id = Math.random().toString();
newProject.state = this.newState;
newProject.type = this.newType;
newProject.category = this.category;
this.store.dispatch(new UpsertProjectInternalAction(newProject));
this.newProjectName = '';
}
} }