mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
prevent ViewImageModal to re-render when file count is unchanged (#7048)
This commit is contained in:
committed by
Harrison Healey
parent
094c2f7308
commit
c130d3630b
@@ -100,7 +100,7 @@ export default class ViewImageModal extends React.Component {
|
||||
this.onModalHidden();
|
||||
}
|
||||
|
||||
if (this.props.fileInfos !== nextProps.fileInfos) {
|
||||
if (this.props.fileInfos.length !== nextProps.fileInfos.length) {
|
||||
this.setState({
|
||||
loaded: Utils.fillArray(false, nextProps.fileInfos.length),
|
||||
progress: Utils.fillArray(0, nextProps.fileInfos.length)
|
||||
|
||||
Reference in New Issue
Block a user