added loading more spinner
This commit is contained in:
@@ -4,6 +4,7 @@ import React from "react";
|
||||
import QuickAccess from "../QuickAccess";
|
||||
import ParentBar from "../ParentBar";
|
||||
import Spinner from "../Spinner";
|
||||
import SpinnerImage from "../SpinnerImage";
|
||||
|
||||
const DataForm = (props) => (
|
||||
<div className={props.parent === "/" ? "file__control--panel" : "file__control--panel folder__view"}>
|
||||
@@ -122,8 +123,12 @@ const DataForm = (props) => (
|
||||
/>
|
||||
))}
|
||||
</table>
|
||||
}
|
||||
}
|
||||
|
||||
<div className="dataform-loadmore-files" style={props.loadingMoreItems ? {} : {display: "none"}}>
|
||||
<SpinnerImage />
|
||||
</div>
|
||||
|
||||
{/* {props.loading ?
|
||||
<div className="dataform__spinner__wrapper">
|
||||
<Spinner />
|
||||
|
||||
@@ -44,7 +44,7 @@ class DataFormContainer extends React.Component {
|
||||
|
||||
const date = new Date();
|
||||
|
||||
if (this.props.loadMoreItems && this.timeout < date.getTime() && !this.props.loading) {
|
||||
if (this.props.loadMoreItems && this.timeout < date.getTime() && !this.props.loadingMoreItems) {
|
||||
this.timeout = date.getTime() + 500;
|
||||
this.loadMoreItems();
|
||||
} else {
|
||||
@@ -145,7 +145,8 @@ const mapStateToProp = (state) => ({
|
||||
search: state.filter.search,
|
||||
isGoogle: state.filter.isGoogle,
|
||||
loadMoreItems: state.main.loadMoreItems,
|
||||
loading: state.main.loading
|
||||
loading: state.main.loading,
|
||||
loadingMoreItems: state.main.loadingMoreItems
|
||||
})
|
||||
|
||||
export default connect(mapStateToProp)(DataFormContainer);
|
||||
Reference in New Issue
Block a user