1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 23:20:51 +00:00

fix deselect markdown file detail (#6780)

This commit is contained in:
Michael An
2024-09-14 15:29:26 +08:00
committed by GitHub
parent 227a9d5a90
commit 7f56426ad8
4 changed files with 6 additions and 22 deletions

View File

@@ -93,7 +93,7 @@ class LibContentView extends React.Component {
asyncOperationProgress: 0,
asyncOperatedFilesLength: 0,
viewId: '0000',
currentDirent: {}
currentDirent: null,
};
this.oldonpopstate = window.onpopstate;
@@ -1914,10 +1914,7 @@ class LibContentView extends React.Component {
};
onCloseMarkdownViewDialog = () => {
this.setState({
isViewFile: false,
currentDirent: {},
});
this.setState({ isViewFile: false });
};
onTreeNodeCollapse = (node) => {
@@ -2193,7 +2190,7 @@ class LibContentView extends React.Component {
};
render() {
let { currentRepoInfo, userPerm, isCopyMoveProgressDialogShow, isDeleteFolderDialogOpen, currentDirent,
let { currentRepoInfo, userPerm, isCopyMoveProgressDialogShow, isDeleteFolderDialogOpen,
path, usedRepoTags } = this.state;
if (this.state.libNeedDecrypt) {
return (
@@ -2358,7 +2355,6 @@ class LibContentView extends React.Component {
isSidePanelFolded={this.props.isSidePanelFolded}
isTreePanelShown={this.state.isTreePanelShown}
currentMode={this.state.currentMode}
currentDirent={currentDirent}
path={this.state.path}
repoID={this.props.repoID}
currentRepoInfo={this.state.currentRepoInfo}