Skip to content

Commit 75ef57b

Browse files
committed
Mark as loading if notes are loading
1 parent e355b53 commit 75ef57b

File tree

1 file changed

+3
-2
lines changed
  • packages/edit-site/src/components/post-list

1 file changed

+3
-2
lines changed

packages/edit-site/src/components/post-list/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ export default function PostList( { postType } ) {
167167
() => records?.map( ( record ) => record.id ) ?? [],
168168
[ records ]
169169
);
170-
const { notesCount } = useNotesCount( postIds );
170+
const { notesCount, isLoading: isLoadingNotesCount } =
171+
useNotesCount( postIds );
171172

172173
// The REST API sort the authors by ID, but we want to sort them by name.
173174
const data = useMemo( () => {
@@ -290,7 +291,7 @@ export default function PostList( { postType } ) {
290291
fields={ fields }
291292
actions={ actions }
292293
data={ data || EMPTY_ARRAY }
293-
isLoading={ isLoadingData }
294+
isLoading={ isLoadingData || isLoadingNotesCount }
294295
view={ view }
295296
onChangeView={ onChangeView }
296297
selection={ selection }

0 commit comments

Comments
 (0)