MM-62944 Fix fileupload settings not being clickable (#30182)

Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
Harrison Healey 2025-02-13 10:17:41 -05:00 committed by GitHub
parent f85a8c61a4
commit 4615ca5f28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,6 +40,10 @@ export default class FileUploadSetting extends React.PureComponent<Props, State>
}; };
} }
handleChooseClick = () => {
this.fileInputRef.current?.click();
};
handleChange = () => { handleChange = () => {
const files = this.fileInputRef.current?.files; const files = this.fileInputRef.current?.files;
if (files && files.length > 0) { if (files && files.length > 0) {
@ -92,6 +96,7 @@ export default class FileUploadSetting extends React.PureComponent<Props, State>
type='button' type='button'
className='btn btn-tertiary' className='btn btn-tertiary'
disabled={this.props.disabled} disabled={this.props.disabled}
onClick={this.handleChooseClick}
> >
<FormattedMessage <FormattedMessage
id='admin.file_upload.chooseFile' id='admin.file_upload.chooseFile'