Skip to content

Commit

Permalink
Fix temporary rendering of folder contents while query is loading (#4936
Browse files Browse the repository at this point in the history
)
  • Loading branch information
davisagli authored and sneridagh committed Jul 6, 2023
1 parent 7ec45f7 commit 93bc0c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions news/4351.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix temporary rendering of folder contents while query results are loading. @davisagli
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ export default function withQuerystringResults(WrappedComponent) {
const hasQuery = querystring?.query?.length > 0;
const hasLoaded = hasQuery ? querystringResults?.[id]?.loaded : true;

const listingItems =
querystring?.query?.length > 0 && querystringResults?.[id]
? querystringResults?.[id]?.items || []
: folderItems;
const listingItems = hasQuery
? querystringResults?.[id]?.items || []
: folderItems;

const showAsFolderListing = !hasQuery && content?.items_total > b_size;
const showAsQueryListing =
Expand Down

0 comments on commit 93bc0c0

Please sign in to comment.