delete dashboards

This commit is contained in:
2023-03-05 18:12:31 +01:00
parent 332611accb
commit 62cb88e505
12 changed files with 129 additions and 12 deletions

View File

@@ -18,5 +18,5 @@
<div mat-dialog-actions align="end">
<button mat-button mat-dialog-close>Cancel</button>
<button mat-button mat-dialog-close (click)="onSaveClick()" cdkFocusInitial>Save</button>
<button mat-button mat-dialog-close (click)="onSaveClick()">Save</button>
</div>

View File

@@ -2,10 +2,10 @@
<div mat-dialog-content>
<mat-form-field appearance="fill">
<mat-label>Text</mat-label>
<textarea matInput [(ngModel)]="text" #textElement></textarea>
<textarea matInput [(ngModel)]="text" #textElement focus></textarea>
</mat-form-field>
</div>
<div mat-dialog-actions align="end">
<button mat-button mat-dialog-close>Cancel</button>
<button mat-button mat-dialog-close (click)="onSaveClick()" cdkFocusInitial>Save</button>
<button mat-button mat-dialog-close (click)="onSaveClick()">Save</button>
</div>

View File

@@ -1,4 +1,4 @@
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { Component, ElementRef, ViewChild } from '@angular/core';
import { MatDialogRef } from '@angular/material/dialog';
@Component({
@@ -6,7 +6,7 @@ import { MatDialogRef } from '@angular/material/dialog';
templateUrl: './add-text-dialog.component.html',
styleUrls: ['./add-text-dialog.component.scss']
})
export class AddTextDialogComponent implements OnInit {
export class AddTextDialogComponent {
text = "";
@ViewChild('textElement') textElement!: ElementRef;
@@ -14,9 +14,6 @@ export class AddTextDialogComponent implements OnInit {
constructor(public dialogRef: MatDialogRef<string>){
}
ngOnInit(): void {
window.setTimeout(() => this.textElement.nativeElement.focus(), 0);
}
onSaveClick(): void {
this.dialogRef.close(this.text);