Updated FileInput with more customizable features, GroupCreate

• Updated:
- FileInput with more customizable features
- GroupCreate file input
This commit is contained in:
mgabdev
2020-07-14 16:37:46 -05:00
parent 5adf3a6ead
commit 80e489fab1
2 changed files with 35 additions and 8 deletions

View File

@@ -114,7 +114,11 @@ class GroupCreate extends ImmutablePureComponent {
}
handleCoverImageChange = (e) => {
this.props.onCoverImageChange(e.target.files[0])
try {
this.props.onCoverImageChange(e.target.files[0])
} catch (error) {
//
}
}
handleSubmit = (e) => {
@@ -165,11 +169,13 @@ class GroupCreate extends ImmutablePureComponent {
<FileInput
disabled={isSubmitting}
id='group-cover-photo'
title={intl.formatMessage(coverImage === null ? messages.coverImage : messages.coverImageChange)}
onChange={this.handleCoverImageChange}
file={group ? group.get('cover_image_url') : undefined}
width='340px'
height='145px'
isBordered
/>
<Divider isInvisible />