aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-forms/reactive-file.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-forms/reactive-file.component.ts')
-rw-r--r--client/src/app/shared/shared-forms/reactive-file.component.ts12
1 files changed, 11 insertions, 1 deletions
diff --git a/client/src/app/shared/shared-forms/reactive-file.component.ts b/client/src/app/shared/shared-forms/reactive-file.component.ts
index 9d27ad07a..50b7d4c3e 100644
--- a/client/src/app/shared/shared-forms/reactive-file.component.ts
+++ b/client/src/app/shared/shared-forms/reactive-file.component.ts
@@ -20,8 +20,12 @@ export class ReactiveFileComponent implements OnInit, ControlValueAccessor {
20 @Input() inputName: string 20 @Input() inputName: string
21 @Input() extensions: string[] = [] 21 @Input() extensions: string[] = []
22 @Input() maxFileSize: number 22 @Input() maxFileSize: number
23
23 @Input() displayFilename = false 24 @Input() displayFilename = false
25 @Input() displayReset = false
26
24 @Input() icon: GlobalIconName 27 @Input() icon: GlobalIconName
28 @Input() buttonTooltip: string
25 29
26 @Output() fileChanged = new EventEmitter<Blob>() 30 @Output() fileChanged = new EventEmitter<Blob>()
27 31
@@ -62,8 +66,14 @@ export class ReactiveFileComponent implements OnInit, ControlValueAccessor {
62 this.file = file 66 this.file = file
63 67
64 this.propagateChange(this.file) 68 this.propagateChange(this.file)
65 this.fileChanged.emit(this.file)
66 } 69 }
70 this.fileChanged.emit(this.file)
71 }
72
73 reset () {
74 this.writeValue(undefined)
75 this.propagateChange(undefined)
76 this.fileChanged.emit(undefined)
67 } 77 }
68 78
69 propagateChange = (_: any) => { /* empty */ } 79 propagateChange = (_: any) => { /* empty */ }