Skip to content

Commit

Permalink
Fix #3174: FileUpload expose getFiles() method to ref (#3176)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Aug 23, 2022
1 parent 3afc95c commit 02c573b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/lib/fileupload/FileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ export const FileUpload = React.memo(
formatSize,
onFileSelect,
getInput: () => fileInputRef.current,
getContent: () => contentRef.current
getContent: () => contentRef.current,
getFiles: () => filesState
}));

const createChooseButton = () => {
Expand Down
1 change: 1 addition & 0 deletions components/lib/fileupload/fileupload.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,5 @@ export declare class FileUpload extends React.Component<FileUploadProps, any> {
public onFileSelect(event: FileUploadSelectParams): void;
public getElement(): HTMLElement;
public getInput(): HTMLInputElement;
public getFiles(): File[];
}

0 comments on commit 02c573b

Please sign in to comment.