Fix upload file input being re-rendered needlessly
This commit is contained in:
parent
7d53ee73f3
commit
1a33e4042e
3 changed files with 9 additions and 6 deletions
|
@ -4,7 +4,7 @@ import { uploadCompose } from '../../../actions/compose';
|
|||
|
||||
const mapStateToProps = state => ({
|
||||
disabled: state.getIn(['compose', 'is_uploading']) || (state.getIn(['compose', 'media_attachments']).size > 3 || state.getIn(['compose', 'media_attachments']).some(m => m.get('type') === 'video')),
|
||||
key: Math.floor((Math.random() * 0x10000))
|
||||
resetFileKey: state.getIn(['compose', 'resetFileKey'])
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue