In my Angular project, I have it so that in grid component there is an ngSwitch that states that if there is no row selected, the default option which is row display component, where you can view the data is displayed and if there is a row selected it then switches to row edit component, where you can edit the data. I also have implemented an accept button into the row edit component to save your changes whenever you're done with them. What I can't find out how to do is to revert back to row display component after the row that has been changed has been updated. How would I go about that?
Here's the code in my grid component for the ngSwitch:
    <ng-container *ngFor="let pto of (ptoData | currentEmployee:empInfo[selectedEmployee].EmpKey); let i = index">
      <ng-container [ngSwitch]="isRowSelected(i)">
        <ng-container *ngSwitchCase="false">
          <ng-container *ngIf="pto.type === selectedType">
            <tr pto-row-display [pto]="pto" (click)="selectRow(i)"></tr>
          </ng-container>
        </ng-container>
        <ng-container *ngSwitchCase="true">
          <tr pto-row-edit [pto]="pto" (onDelete)="onDelete($event)" *ngIf="pto.type === selectedType"></tr>
        </ng-container>
    </ng-container>
   </ng-container>
and then here's my save/update function in row edit component:
saveRow(p : PTOData): void {
    this.ptodataService.update(p) 
}
Here's my rowSelected code:
rowSelected: number;
isRowSelected(i: number) {
    return i == this.rowSelected;
}
selectRow(i: number) {
    this.rowSelected = i;
}
    
ngSwitchcode at the very least?