1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-17 15:53:28 +00:00

modify function name

This commit is contained in:
zxj96
2019-04-24 15:16:26 +08:00
parent 0c4dea01c5
commit 813a702ab5
2 changed files with 6 additions and 6 deletions

View File

@@ -85,7 +85,7 @@ const propTypes = {
showDirentDetail: PropTypes.func.isRequired, showDirentDetail: PropTypes.func.isRequired,
onDeleteRepoTag: PropTypes.func.isRequired, onDeleteRepoTag: PropTypes.func.isRequired,
updateDetail: PropTypes.bool.isRequired, updateDetail: PropTypes.bool.isRequired,
onPageScroll: PropTypes.func.isRequired, onListContainerScroll: PropTypes.func.isRequired,
}; };
class LibContentContainer extends React.Component { class LibContentContainer extends React.Component {
@@ -142,7 +142,7 @@ class LibContentContainer extends React.Component {
onItemsScroll = (e) => { onItemsScroll = (e) => {
let target = e.target; let target = e.target;
if (target.scrollTop + document.documentElement.clientHeight - target.offsetTop >= target.scrollHeight) { if (target.scrollTop + document.documentElement.clientHeight - target.offsetTop >= target.scrollHeight) {
this.props.onPageScroll(); this.props.onListContainerScroll();
} }
} }

View File

@@ -403,7 +403,7 @@ class LibContentView extends React.Component {
if (!this.state.repoEncrypted && direntList.length) { if (!this.state.repoEncrypted && direntList.length) {
this.getThumbnails(repoID, path, this.state.direntList); this.getThumbnails(repoID, path, this.state.direntList);
} }
this.onSwitchPage(); this.resetShowLength();
}).catch(() => { }).catch(() => {
this.setState({ this.setState({
isDirentListLoading: false, isDirentListLoading: false,
@@ -412,13 +412,13 @@ class LibContentView extends React.Component {
}); });
} }
onPageScroll = () => { onListContainerScroll = () => {
let itemsShowLength = this.state.itemsShowLength; let itemsShowLength = this.state.itemsShowLength;
itemsShowLength += 100; itemsShowLength += 100;
this.setState({itemsShowLength: itemsShowLength}); this.setState({itemsShowLength: itemsShowLength});
} }
onSwitchPage = () => { resetShowLength = () => {
this.setState({itemsShowLength: 100}); this.setState({itemsShowLength: 100});
} }
@@ -1467,7 +1467,7 @@ class LibContentView extends React.Component {
onDeleteRepoTag={this.onDeleteRepoTag} onDeleteRepoTag={this.onDeleteRepoTag}
onToolbarFileTagChanged={this.onToolbarFileTagChanged} onToolbarFileTagChanged={this.onToolbarFileTagChanged}
updateDetail={this.state.updateDetail} updateDetail={this.state.updateDetail}
onPageScroll={this.onPageScroll} onListContainerScroll={this.onListContainerScroll}
/> />
{this.state.pathExist && !this.state.isViewFile && ( {this.state.pathExist && !this.state.isViewFile && (
<FileUploader <FileUploader