From bb4aa7d5504c4d03c153b4c21fddc071600ca7b8 Mon Sep 17 00:00:00 2001 From: Tatiana Lopaeva Date: Wed, 20 Oct 2021 15:36:14 +0300 Subject: [PATCH] Web: Files: Fixed showing not version badge after scrolling. --- .../pages/VersionHistory/Section/Body/index.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/index.js b/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/index.js index 76fa553b8b9..69320ba40db 100644 --- a/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/index.js +++ b/products/ASC.Files/Client/src/pages/VersionHistory/Section/Body/index.js @@ -63,13 +63,15 @@ class SectionBodyContent extends React.Component { renderRow = memo(({ index, style }) => { const { versions, culture } = this.props; const { isRestoreProcess } = this.state; - console.log("isRestoreProcess row", this.state); + + const prevVersion = versions[index > 0 ? index - 1 : index].versionGroup; let isVersion = true; - if (this.itemVersion === versions[index].versionGroup) { + + if (index > 0 && prevVersion === versions[index].versionGroup) { + //console.log("isVersion if"); isVersion = false; - } else { - this.itemVersion = versions[index].versionGroup; } + return (
{ - console.log("this.state. render list", this.state); + //console.log("this.state. render list", this.state); return (