issue-5-gamesystems #6
| @ -4,7 +4,7 @@ | ||||
|     <td mat-cell *matCellDef="let state"> | ||||
|       <span *ngIf="editedElement !== state"> {{state.stateLabel}}</span> | ||||
|       <mat-form-field appearance="fill" class="long-form" *ngIf="editedElement === state"> | ||||
|         <input matInput [(ngModel)]="state.stateLabel" (ngModelChange)="isEditedStateValid()"> | ||||
|         <input matInput [(ngModel)]="state.stateLabel" (ngModelChange)="onStateChange()"> | ||||
|         <mat-hint class="mat-error" *ngIf="editedStateLabelError"><mat-icon class="warning-icon">warning</mat-icon>Missing State-Label Information</mat-hint> | ||||
|       </mat-form-field> | ||||
|     </td> | ||||
| @ -17,7 +17,7 @@ | ||||
|         <p *ngIf="editedElement !== element">{{element.stateDescription}}</p> | ||||
|         <mat-form-field appearance="fill" class="long-form" *ngIf="element === editedElement"> | ||||
|           <mat-label>Description</mat-label> | ||||
|           <textarea matInput [(ngModel)]="element.stateDescription" rows="3"></textarea> | ||||
|           <textarea matInput [(ngModel)]="element.stateDescription" rows="3" (ngModelChange)="onStateChange()"></textarea> | ||||
|         </mat-form-field> | ||||
|       </div> | ||||
|     </td> | ||||
| @ -32,7 +32,7 @@ | ||||
|         <mat-icon *ngIf="state.initial">done</mat-icon> | ||||
|         <mat-icon *ngIf="!state.initial">close</mat-icon> | ||||
|       </div> | ||||
|       <mat-checkbox *ngIf="editedElement === state" [(ngModel)]="state.initial"></mat-checkbox> | ||||
|       <mat-checkbox *ngIf="editedElement === state" [(ngModel)]="state.initial" (ngModelChange)="onStateChange()"></mat-checkbox> | ||||
| 
 | ||||
|     </td> | ||||
|   </ng-container> | ||||
|  | ||||
| @ -76,7 +76,11 @@ export class SimpleStateEditorComponent implements OnInit{ | ||||
|         this.dataSource.data = this.gamesystem.states; | ||||
|         this.editedElement = simpleState; | ||||
|         this.expandedElement = simpleState; | ||||
|         this.onStateChange(); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   onStateChange() { | ||||
|     this.gamesystem!.onModifyContent(); | ||||
|   } | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user