added loading more spinner

This commit is contained in:
kyle hoell
2020-11-29 01:19:16 -05:00
parent b40be88e82
commit a1bdbae7f1
6 changed files with 37 additions and 5 deletions
+6 -1
View File
@@ -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 />
+3 -2
View File
@@ -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);