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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user