fixed issue with loading more
This commit is contained in:
@@ -55,6 +55,10 @@ class DataFormContainer extends React.Component {
|
||||
|
||||
loadMoreItems = () => {
|
||||
|
||||
// return;
|
||||
|
||||
console.log("load more items dataform");
|
||||
|
||||
let limit = window.localStorage.getItem("list-size") || 50
|
||||
limit = parseInt(limit)
|
||||
|
||||
|
||||
@@ -73,7 +73,9 @@ class MainSectionContainer extends React.Component {
|
||||
|
||||
scrollEvent = (e) => {
|
||||
|
||||
if (!mobileCheck()) return;
|
||||
//if (!mobileCheck()) return;
|
||||
|
||||
return;
|
||||
|
||||
const scrollY = window.pageYOffset;
|
||||
const windowY = document.documentElement.scrollHeight;
|
||||
@@ -84,7 +86,9 @@ class MainSectionContainer extends React.Component {
|
||||
if (this.props.loading) return;
|
||||
|
||||
if ((windowY / 2) < scrollY && this.props.allowLoadMoreItems) {
|
||||
|
||||
|
||||
console.log("load more main")
|
||||
|
||||
if (this.props.files.length >= limit) {
|
||||
const parent = this.props.parent;
|
||||
const search = this.props.filter.search;
|
||||
@@ -108,6 +112,8 @@ class MainSectionContainer extends React.Component {
|
||||
|
||||
componentDidUpdate = () => {
|
||||
|
||||
console.log("main updated");
|
||||
|
||||
// console.log("update ID main", getUpdateSettingsID());
|
||||
|
||||
// if (this.lastSettingsUpdateID !== getUpdateSettingsID()) {
|
||||
@@ -191,6 +197,10 @@ class MainSectionContainer extends React.Component {
|
||||
}
|
||||
|
||||
loadMoreItems = () => {
|
||||
|
||||
return;
|
||||
|
||||
console.log("load more main")
|
||||
|
||||
if (mobileCheck()) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user