1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 23:02:26 +00:00

fix: sodc history ui (#5478)

This commit is contained in:
杨国璇
2023-05-18 13:52:49 +08:00
committed by GitHub
parent ae52fbe261
commit 33c80ff085
5 changed files with 70 additions and 24 deletions

View File

@@ -163,8 +163,11 @@ class SidePanel extends Component {
}
onShowChanges = () => {
const { isShowChanges } = this.props;
this.props.onShowChanges(!isShowChanges);
const { isShowChanges, currentVersion } = this.props;
const { historyVersions } = this.state;
const historyVersionIndex = historyVersions.findIndex(item => item.commitId === currentVersion.commitId);
const lastVersion = historyVersions[historyVersionIndex + 1];
this.props.onShowChanges(!isShowChanges, lastVersion);
}
render() {