Skip to content

Commit

Permalink
Merge pull request #43497 from tsa321/searchReorderSkeleton
Browse files Browse the repository at this point in the history
Fix list item skeleton appears when ordering search result
  • Loading branch information
luacmartins authored Jun 11, 2024
2 parents 0c3b262 + de84546 commit 4acd9d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function Search({query, policyIDs, sortBy, sortOrder}: SearchProps) {
}, [hash, isOffline]);

const isLoadingItems = (!isOffline && isLoadingOnyxValue(searchResultsMeta)) || searchResults?.data === undefined;
const isLoadingMoreItems = !isLoadingItems && searchResults?.search?.isLoading;
const isLoadingMoreItems = !isLoadingItems && searchResults?.search?.isLoading && searchResults?.search?.offset > 0;
const shouldShowEmptyState = !isLoadingItems && isEmptyObject(searchResults?.data);

if (isLoadingItems) {
Expand Down

0 comments on commit 4acd9d2

Please sign in to comment.