Added config concept
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
|
||||
<mat-form-field appearance="fill" class="doors">
|
||||
<mat-label>Deuren</mat-label>
|
||||
<mat-select [(value)]="door" [disabled]="!project">
|
||||
<mat-select [(value)]="door" [disabled]="!project" (selectionChange)="focus()">
|
||||
<mat-option *ngFor="let doorOption of doors" [value]="doorOption">
|
||||
{{ doorOption?.nr }}
|
||||
</mat-option>
|
||||
|
||||
@@ -35,7 +35,7 @@ export class MultiplesComponent implements OnInit {
|
||||
);
|
||||
|
||||
this.electronIpc.receive<void>(WindowApiConst.PRINT_OUTPUT, () => {
|
||||
console.log('received');
|
||||
this.focus();
|
||||
});
|
||||
|
||||
this.refreshProjects();
|
||||
@@ -45,14 +45,9 @@ export class MultiplesComponent implements OnInit {
|
||||
this.electronIpc.send(WindowApiConst.FILELIST_INPUT, 'refresh');
|
||||
}
|
||||
|
||||
loadProject(project: string): void {
|
||||
this.electronIpc.send(WindowApiConst.PROJECT_INPUT, project);
|
||||
}
|
||||
|
||||
projectChange(event: any): void {
|
||||
this.door = undefined;
|
||||
console.log(event);
|
||||
// this.project = event.value;
|
||||
this.project = this.projects.find(x => x.name === event.value);
|
||||
this.electronIpc.send(WindowApiConst.PROJECT_INPUT, this.project);
|
||||
}
|
||||
|
||||
@@ -75,7 +70,10 @@ export class MultiplesComponent implements OnInit {
|
||||
focus(): void {
|
||||
setTimeout(() => {
|
||||
// eslint-disable-next-line unicorn/prefer-query-selector
|
||||
document.getElementById('textsearch')?.focus();
|
||||
const input = document.getElementById('textsearch');
|
||||
|
||||
(input as any).value = "";
|
||||
input?.focus();
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user