Make file input work properly when there are multiple on page
This commit is contained in:
parent
240422aa94
commit
c3a9e69176
@ -34,6 +34,7 @@ import { Subscription } from 'rxjs';
|
|||||||
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
||||||
import { FlowDirective } from '@flowjs/ngx-flow';
|
import { FlowDirective } from '@flowjs/ngx-flow';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { UtilsService } from '@core/services/utils.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'tb-file-input',
|
selector: 'tb-file-input',
|
||||||
@ -59,7 +60,7 @@ export class FileInputComponent extends PageComponent implements AfterViewInit,
|
|||||||
noFileText = 'import.no-file';
|
noFileText = 'import.no-file';
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
inputId = 'select';
|
inputId = this.utils.guid();
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
allowedExtensions: string;
|
allowedExtensions: string;
|
||||||
@ -114,6 +115,7 @@ export class FileInputComponent extends PageComponent implements AfterViewInit,
|
|||||||
private propagateChange = null;
|
private propagateChange = null;
|
||||||
|
|
||||||
constructor(protected store: Store<AppState>,
|
constructor(protected store: Store<AppState>,
|
||||||
|
private utils: UtilsService,
|
||||||
public translate: TranslateService) {
|
public translate: TranslateService) {
|
||||||
super(store);
|
super(store);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user