mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 19:08:21 +00:00
Merge pull request #3349 from haiwen/list-optimization
List optimization
This commit is contained in:
@@ -248,12 +248,16 @@ class DirColumnNav extends React.Component {
|
||||
}));
|
||||
}
|
||||
|
||||
stopTreeScrollPropagation = (e) => {
|
||||
e.stopPropagation();
|
||||
}
|
||||
|
||||
render() {
|
||||
let flex = this.props.navRate ? '0 0 ' + this.props.navRate * 100 + '%' : '0 0 25%';
|
||||
const select = this.props.inResizing ? 'none' : '';
|
||||
return (
|
||||
<Fragment>
|
||||
<div className="dir-content-nav" role="navigation" style={{flex: (flex), userSelect: select}}>
|
||||
<div className="dir-content-nav" role="navigation" style={{flex: (flex), userSelect: select}} onScroll={this.stopTreeScrollPropagation}>
|
||||
{this.props.isTreeDataLoading ?
|
||||
(<Loading/>) :
|
||||
(<TreeView
|
||||
|
@@ -29,6 +29,7 @@ const propTypes = {
|
||||
showShareBtn: PropTypes.bool.isRequired,
|
||||
showDirentDetail: PropTypes.func.isRequired,
|
||||
onAddFolder: PropTypes.func.isRequired,
|
||||
onFileTagChanged: PropTypes.func,
|
||||
};
|
||||
|
||||
class DirGridView extends React.Component {
|
||||
@@ -53,6 +54,7 @@ class DirGridView extends React.Component {
|
||||
draftCounts={this.props.draftCounts}
|
||||
usedRepoTags={this.props.usedRepoTags}
|
||||
updateUsedRepoTags={this.props.updateUsedRepoTags}
|
||||
onFileTagChanged={this.props.onFileTagChanged}
|
||||
/>
|
||||
)}
|
||||
<DirentGridView
|
||||
|
@@ -75,7 +75,7 @@ class DirentGridView extends React.Component{
|
||||
this.setState({activeDirent: dirent});
|
||||
this.props.onGridItemClick(dirent);
|
||||
}
|
||||
|
||||
|
||||
onMoveToggle = () => {
|
||||
this.setState({isMoveDialogShow: !this.state.isMoveDialogShow});
|
||||
}
|
||||
|
Reference in New Issue
Block a user