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

Add right-click menu, move and copy effects (#3148)

This commit is contained in:
zxj96
2019-03-23 14:16:48 +08:00
committed by Daniel Pan
parent 2327106844
commit 5a6ab8ab07
7 changed files with 293 additions and 4 deletions

View File

@@ -17,6 +17,8 @@ const propTypes = {
onFreezedItem: PropTypes.func.isRequired,
onUnFreezedItem: PropTypes.func.isRequired,
onMenuItemClick: PropTypes.func,
registerHandlers: PropTypes.func,
unregisterHandlers: PropTypes.func,
};
class TreeNodeView extends React.Component {
@@ -36,6 +38,7 @@ class TreeNodeView extends React.Component {
isHighlight: true,
});
}
this.props.onNodeChanged(this.props.node)
}
onMouseLeave = () => {
@@ -45,6 +48,7 @@ class TreeNodeView extends React.Component {
isHighlight: false,
});
}
this.props.onNodeChanged(null)
}
onNodeClick = () => {
@@ -127,6 +131,9 @@ class TreeNodeView extends React.Component {
onFreezedItem={this.props.onFreezedItem}
onMenuItemClick={this.onMenuItemClick}
onUnFreezedItem={this.onUnFreezedItem}
onNodeChanged={this.props.onNodeChanged}
registerHandlers={this.props.registerHandlers}
unregisterHandlers={this.props.unregisterHandlers}
/>
);
})}
@@ -165,6 +172,8 @@ class TreeNodeView extends React.Component {
onMenuItemClick={this.onMenuItemClick}
onUnFreezedItem={this.onUnFreezedItem}
onFreezedItem={this.props.onFreezedItem}
registerHandlers={this.props.registerHandlers}
unregisterHandlers={this.props.unregisterHandlers}
/>
)}
</div>