delete dashboards
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user