Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 38645d9

Browse files
committed
Fix loading state issues for spaces pagination
1 parent d74e9c4 commit 38645d9

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/structures/SpaceHierarchy.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ const SpaceHierarchy = ({
441441

442442
let content: JSX.Element;
443443
let loader: JSX.Element;
444-
if (loading) {
444+
if (loading && !rooms.length) {
445445
content = <Spinner />;
446446
} else {
447447
let manageButtons;
@@ -558,9 +558,11 @@ const SpaceHierarchy = ({
558558
/>
559559
</>;
560560

561-
loader = <div ref={loaderRef}>
562-
<Spinner />
563-
</div>;
561+
if (hierarchy.canLoadMore) {
562+
loader = <div ref={loaderRef}>
563+
<Spinner />
564+
</div>;
565+
}
564566
} else {
565567
results = <div className="mx_SpaceHierarchy_noResults">
566568
<h3>{ _t("No results found") }</h3>

0 commit comments

Comments
 (0)