Updated confirm dialog to support async requests with loading spinner
parent
d7631360cc
commit
c5b0a7a697
@ -1,12 +1,15 @@
|
||||
<h4 mat-dialog-title>{{dialogTitle}}</h4>
|
||||
<mat-dialog-content>
|
||||
<div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
{{dialogText}}
|
||||
</div>
|
||||
</mat-dialog-content>
|
||||
<mat-dialog-actions>
|
||||
<!-- The mat-dialog-close directive optionally accepts a value as a result for the dialog. -->
|
||||
<button color="primary" mat-flat-button type="submit" [mat-dialog-close]="true">{{submitText}}</button>
|
||||
<button color="primary" mat-flat-button type="submit" (click)="confirmClicked()">{{submitText}}</button>
|
||||
<div class="mat-spinner" *ngIf="submitClicked">
|
||||
<mat-spinner [diameter]="25"></mat-spinner>
|
||||
</div>
|
||||
<span class="spacer"></span>
|
||||
<button style="float: right;" mat-stroked-button mat-dialog-close>Cancel</button>
|
||||
</mat-dialog-actions>
|
||||
@ -1 +1,5 @@
|
||||
.spacer {flex: 1 1 auto;}
|
||||
.spacer {flex: 1 1 auto;}
|
||||
|
||||
.mat-spinner {
|
||||
margin-left: 8px;
|
||||
}
|
||||
Loading…
Reference in New Issue