mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 07:22:34 +00:00
Item right menu (#3203)
* Add item right menu * Add item right menu * Pass value bug * Add item right menu * modify style problem * Add some style * Modifying naming issues * Modify Priority * Add showShare jurisdiction and modify priority * Modify subscript to itemIndex * Communication between sibling components * Improve interaction * modify style problem * Promotion isItemFreezed and onUnfreezedItem level * modify bugs * have tree-node bug * Solve tree-node item-click bug * Complete right click menu * modify style * modify style * item-right-menu finash * modify style to dirent-=list-item * modify some style problem * modify styles * stop thead contextmenu
This commit is contained in:
@@ -10,6 +10,7 @@ const propTypes = {
|
||||
onMenuItemClick: PropTypes.func.isRequired,
|
||||
onFreezedItem: PropTypes.func.isRequired,
|
||||
onUnfreezedItem: PropTypes.func.isRequired,
|
||||
appMenuType: PropTypes.oneOf(['list_view_contextmenu', 'item_contextmenu', 'tree_contextmenu', 'item_op_menu']),
|
||||
};
|
||||
|
||||
class DirentMenu extends React.Component {
|
||||
@@ -26,6 +27,12 @@ class DirentMenu extends React.Component {
|
||||
this.menuList = this.calculateMenuList();
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProp) {
|
||||
if (nextProp.appMenuType === 'list_view_contextmenu' || nextProp.appMenuType === 'item_contextmenu') {
|
||||
this.setState({isItemMenuShow: false});
|
||||
}
|
||||
}
|
||||
|
||||
calculateMenuList() {
|
||||
let { currentRepoInfo, dirent, isRepoOwner } = this.props;
|
||||
|
||||
|
Reference in New Issue
Block a user