Made dropdown work immediately on press

This commit is contained in:
Kelly McDonald 2021-01-26 10:06:13 -05:00
parent 062b6e853a
commit 528772cdfd
1 changed files with 2 additions and 22 deletions

View File

@ -45,9 +45,10 @@
</a> </a>
</mat-menu> </mat-menu>
<button mat-menu-item (click)="openMethod = 'file'; expandToolbar = true"> <button mat-menu-item (click)="fileInput.click()">
<mat-icon>code</mat-icon> <mat-icon>code</mat-icon>
Open from XML File Open from XML File
<input hidden (change)="onFileSelected($event)" #fileInput type="file" id="file" accept=".bpmn,.dmn,.xml,application/xml,text/xml">
</button> </button>
</mat-menu> </mat-menu>
@ -69,27 +70,6 @@
{{getFileName()}} {{getFileName()}}
</button> </button>
</mat-toolbar-row> </mat-toolbar-row>
<mat-toolbar-row *ngIf="expandToolbar">
<ng-container *ngIf="!openMethod">
<mat-form-field>
<input matInput [(ngModel)]="fileName" placeholder="File name" type="text">
</mat-form-field>
</ng-container>
<button
mat-flat-button
(click)="fileInput.click()"
[disabled]="!diagramFile"
color="primary"
id="open_file_button"
>Open file <mat-icon>arrow_forward</mat-icon>
<input hidden (change)="onFileSelected($event)" #fileInput type="file" id="file" accept=".bpmn,.dmn,.xml,application/xml,text/xml">
</button>
<span fxFlex></span>
<button mat-icon-button (click)="expandToolbar = false"><mat-icon>close</mat-icon></button>
</mat-toolbar-row>
</mat-toolbar> </mat-toolbar>
<div fxLayout="column"> <div fxLayout="column">
<div class="diagram-parent"> <div class="diagram-parent">