Skip to content

Commit

Permalink
Fix list item skeleton displayed when ordering search result
Browse files Browse the repository at this point in the history
Signed-off-by: Tsaqif <tsaiinkwa@yahoo.com>
  • Loading branch information
tsa321 committed Jun 11, 2024
1 parent 4f2901f commit de84546
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 de84546

Please sign in to comment.