This commit is contained in:
Josh Hawkins 2024-11-01 20:19:42 -05:00
parent a6f15e1d78
commit 8124209ba3

View File

@ -399,9 +399,9 @@ export default function SearchView({
</div>
)}
{(!isLoading || uniqueResults?.length == 0) &&
isValidating &&
(searchTerm ||
{((isLoading && uniqueResults?.length == 0) || // show on initial load
(isValidating && !isLoading)) && // or revalidation
(searchTerm || // or change of filter/search term
(searchFilter && Object.keys(searchFilter).length !== 0)) && (
<ActivityIndicator className="absolute left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 rounded-2xl bg-background/80 p-3 dark:bg-background/50" />
)}