From 38645d90545d28f0726fde571b18e0b230a0f18d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 11 Aug 2021 17:07:53 +0100 Subject: [PATCH] Fix loading state issues for spaces pagination --- src/components/structures/SpaceHierarchy.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/structures/SpaceHierarchy.tsx b/src/components/structures/SpaceHierarchy.tsx index c55902cf70..cea6a568e7 100644 --- a/src/components/structures/SpaceHierarchy.tsx +++ b/src/components/structures/SpaceHierarchy.tsx @@ -441,7 +441,7 @@ const SpaceHierarchy = ({ let content: JSX.Element; let loader: JSX.Element; - if (loading) { + if (loading && !rooms.length) { content = ; } else { let manageButtons; @@ -558,9 +558,11 @@ const SpaceHierarchy = ({ /> ; - loader =
- -
; + if (hierarchy.canLoadMore) { + loader =
+ +
; + } } else { results =

{ _t("No results found") }