input file added accept parameter
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
#fileInput
|
#fileInput
|
||||||
class="input"
|
class="input"
|
||||||
type="file"
|
type="file"
|
||||||
|
[accept]="accept().join(', ')"
|
||||||
(input)="onInput($event)"
|
(input)="onInput($event)"
|
||||||
(focus)="onFocus()"
|
(focus)="onFocus()"
|
||||||
[placeholder]="currentPlaceholder()"
|
[placeholder]="currentPlaceholder()"
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ import {DisabledReason, FormValueControl, ValidationError, WithOptionalField} fr
|
|||||||
})
|
})
|
||||||
export class QdInputFile implements FormValueControl<File> {
|
export class QdInputFile implements FormValueControl<File> {
|
||||||
value = model<File>(new File([], "", undefined));
|
value = model<File>(new File([], "", undefined));
|
||||||
placeholder = input<string>('Placeholder');
|
placeholder = input<string>('File');
|
||||||
|
accept = input<string[]>([]);
|
||||||
|
|
||||||
// Writable interaction state - control updates these
|
// Writable interaction state - control updates these
|
||||||
touched = model<boolean>(false);
|
touched = model<boolean>(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user