1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 16:10:26 +00:00

optimize menu show&hide (#5481)

This commit is contained in:
杨顺强
2023-05-18 17:46:59 +08:00
committed by GitHub
parent 33c80ff085
commit ce949d0b53
5 changed files with 18 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ const propTypes = {
isGroupOwnedRepo: PropTypes.bool.isRequired,
userPerm: PropTypes.string,
showDirentDetail: PropTypes.func.isRequired,
loadDirentList: PropTypes.func.isRequired,
loadDirentList: PropTypes.func,
};
class DirentListView extends React.Component {
@@ -125,6 +125,7 @@ class DirentListView extends React.Component {
}
onDirentClick = (dirent) => {
hideMenu();
if (this.props.selectedDirentList.length > 0 && !this.state.activeDirent ) {
return;
}
@@ -311,6 +312,7 @@ class DirentListView extends React.Component {
// table-container contextmenu handle
onContainerClick = () => {
hideMenu();
if (this.state.activeDirent) {
this.onDirentClick(null);
}