Skip to content

Commit

Permalink
Web: Files: Fixed showing not version badge after scrolling.
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaLopaeva committed Nov 3, 2021
1 parent e25759e commit bb4aa7d
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div style={style}>
<VersionRow
Expand All @@ -91,10 +93,10 @@ class SectionBodyContent extends React.Component {
const { versions, culture, isLoading, isTabletView } = this.props;
const { isRestoreProcess, itemHeight } = this.state;
//console.log("VersionHistory SectionBodyContent render()", versions);
console.log("this.state.", this.state, "versions.length", versions?.length);
this.itemVersion = null;
//console.log("this.state.", this.state, "versions.length", versions?.length);

const renderList = ({ height, width }) => {
console.log("this.state. render list", this.state);
//console.log("this.state. render list", this.state);
return (
<List
key={this.listKey}
Expand Down

0 comments on commit bb4aa7d

Please sign in to comment.