Fix loading state issues for spaces pagination

This commit is contained in:
Michael Telatynski 2021-08-11 17:07:53 +01:00
parent d74e9c4f90
commit 38645d9054

View file

@ -441,7 +441,7 @@ const SpaceHierarchy = ({
let content: JSX.Element;
let loader: JSX.Element;
if (loading) {
if (loading && !rooms.length) {
content = <Spinner />;
} else {
let manageButtons;
@ -558,9 +558,11 @@ const SpaceHierarchy = ({
/>
</>;
loader = <div ref={loaderRef}>
<Spinner />
</div>;
if (hierarchy.canLoadMore) {
loader = <div ref={loaderRef}>
<Spinner />
</div>;
}
} else {
results = <div className="mx_SpaceHierarchy_noResults">
<h3>{ _t("No results found") }</h3>