prevent ViewImageModal to re-render when file count is unchanged (#7048)
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
094c2f7308
Коммит
c130d3630b
@@ -100,7 +100,7 @@ export default class ViewImageModal extends React.Component {
|
|||||||
this.onModalHidden();
|
this.onModalHidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.props.fileInfos !== nextProps.fileInfos) {
|
if (this.props.fileInfos.length !== nextProps.fileInfos.length) {
|
||||||
this.setState({
|
this.setState({
|
||||||
loaded: Utils.fillArray(false, nextProps.fileInfos.length),
|
loaded: Utils.fillArray(false, nextProps.fileInfos.length),
|
||||||
progress: Utils.fillArray(0, nextProps.fileInfos.length)
|
progress: Utils.fillArray(0, nextProps.fileInfos.length)
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user