diff --git a/src/app/components/components/file-upload/file-upload.component.html b/src/app/components/components/file-upload/file-upload.component.html index 639f6f7aec..532849f989 100644 --- a/src/app/components/components/file-upload/file-upload.component.html +++ b/src/app/components/components/file-upload/file-upload.component.html @@ -89,7 +89,7 @@

Multiple selection/drop for only .sql files and custom col file_upload - {{ fileMultipleUpload.files?.name || fileMultipleUpload.files?.length }} files selected + {{ fileMultipleUpload.value?.name || fileMultipleUpload.value?.length }} files selected attach_file @@ -115,7 +115,7 @@

Multiple selection/drop for only .sql files and custom col accept=".sql" defaultColor="accent" activeColor="warn" cancelColor="primary" multiple [disabled]="disabled"> file_upload - { { fileMultipleUpload.files?.name || fileMultipleUpload.files?.length } } files selected + { { fileMultipleUpload.value?.name || fileMultipleUpload.value?.length } } files selected attach_file diff --git a/src/platform/core/file/file-upload/README.md b/src/platform/core/file/file-upload/README.md index 00d7823159..baf354c527 100644 --- a/src/platform/core/file/file-upload/README.md +++ b/src/platform/core/file/file-upload/README.md @@ -9,7 +9,7 @@ Example for usage: ```html - file_upload{{ fileUpload.files?.name }} + file_upload{{ files?.name }} attach_file diff --git a/src/platform/core/file/file-upload/file-upload.component.spec.ts b/src/platform/core/file/file-upload/file-upload.component.spec.ts index a1461d2eab..e54e847dd1 100644 --- a/src/platform/core/file/file-upload/file-upload.component.spec.ts +++ b/src/platform/core/file/file-upload/file-upload.component.spec.ts @@ -53,7 +53,7 @@ describe('Component: FileUpload', () => { fixture.whenStable().then(() => { expect(fixture.debugElement.query(By.css('td-file-input'))).toBeTruthy(); expect(fixture.debugElement.query(By.css('.td-file-upload'))).toBeFalsy(); - expect(fixture.debugElement.query(By.directive(TdFileUploadComponent)).componentInstance.files) + expect(fixture.debugElement.query(By.directive(TdFileUploadComponent)).componentInstance.value) .toBeUndefined(); }); }); @@ -81,7 +81,7 @@ describe('Component: FileUpload', () => { fixture.whenStable().then(() => { expect(fixture.debugElement.query(By.css('td-file-input'))).toBeTruthy(); expect(fixture.debugElement.query(By.css('.td-file-upload'))).toBeFalsy(); - expect(fixture.debugElement.query(By.directive(TdFileUploadComponent)).componentInstance.files).toBeUndefined(); + expect(fixture.debugElement.query(By.directive(TdFileUploadComponent)).componentInstance.value).toBeUndefined(); }); }); }); @@ -196,7 +196,7 @@ describe('Component: FileUpload', () => { template: ` - {{ fileUpload.files?.name }} + {{ fileUpload.value?.name }} Choose a file... diff --git a/src/platform/core/file/file-upload/file-upload.component.ts b/src/platform/core/file/file-upload/file-upload.component.ts index 10abaada8a..def7c7de4e 100644 --- a/src/platform/core/file/file-upload/file-upload.component.ts +++ b/src/platform/core/file/file-upload/file-upload.component.ts @@ -29,13 +29,6 @@ export class TdFileUploadComponent extends _TdFileUploadMixinBase implements ICo private _multiple: boolean = false; private _required: boolean = false; - /** - * @deprecated use value property instead - */ - get files(): FileList | File { - return this.value; - } - @ViewChild(TdFileInputComponent) fileInput: TdFileInputComponent; @ContentChild(TdFileInputLabelDirective) inputLabel: TdFileInputLabelDirective;