mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 10:58:33 +00:00
modify function name
This commit is contained in:
@@ -85,7 +85,7 @@ const propTypes = {
|
||||
showDirentDetail: PropTypes.func.isRequired,
|
||||
onDeleteRepoTag: PropTypes.func.isRequired,
|
||||
updateDetail: PropTypes.bool.isRequired,
|
||||
onPageScroll: PropTypes.func.isRequired,
|
||||
onListContainerScroll: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
class LibContentContainer extends React.Component {
|
||||
@@ -142,7 +142,7 @@ class LibContentContainer extends React.Component {
|
||||
onItemsScroll = (e) => {
|
||||
let target = e.target;
|
||||
if (target.scrollTop + document.documentElement.clientHeight - target.offsetTop >= target.scrollHeight) {
|
||||
this.props.onPageScroll();
|
||||
this.props.onListContainerScroll();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -403,7 +403,7 @@ class LibContentView extends React.Component {
|
||||
if (!this.state.repoEncrypted && direntList.length) {
|
||||
this.getThumbnails(repoID, path, this.state.direntList);
|
||||
}
|
||||
this.onSwitchPage();
|
||||
this.resetShowLength();
|
||||
}).catch(() => {
|
||||
this.setState({
|
||||
isDirentListLoading: false,
|
||||
@@ -412,13 +412,13 @@ class LibContentView extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
onPageScroll = () => {
|
||||
onListContainerScroll = () => {
|
||||
let itemsShowLength = this.state.itemsShowLength;
|
||||
itemsShowLength += 100;
|
||||
this.setState({itemsShowLength: itemsShowLength});
|
||||
}
|
||||
|
||||
onSwitchPage = () => {
|
||||
resetShowLength = () => {
|
||||
this.setState({itemsShowLength: 100});
|
||||
}
|
||||
|
||||
@@ -1467,7 +1467,7 @@ class LibContentView extends React.Component {
|
||||
onDeleteRepoTag={this.onDeleteRepoTag}
|
||||
onToolbarFileTagChanged={this.onToolbarFileTagChanged}
|
||||
updateDetail={this.state.updateDetail}
|
||||
onPageScroll={this.onPageScroll}
|
||||
onListContainerScroll={this.onListContainerScroll}
|
||||
/>
|
||||
{this.state.pathExist && !this.state.isViewFile && (
|
||||
<FileUploader
|
||||
|
Reference in New Issue
Block a user