Fix infinite scroll bug with Group Search

This commit is contained in:
Chewbacca
2023-04-04 11:45:27 -04:00
parent 17800fa56f
commit 8cb0540361
2 changed files with 2 additions and 69 deletions

View File

@@ -26,7 +26,7 @@ export default (props: Props) => {
const debouncedValueToSave = debounce(searchValue as string, 1000);
const groupSearchResult = useGroupSearch(debouncedValue);
const { groups, isFetching, isFetched, isError } = groupSearchResult;
const { groups, isLoading, isFetched, isError } = groupSearchResult;
const hasSearchResults = isFetched && groups.length > 0;
const hasNoSearchResults = isFetched && groups.length === 0;
@@ -37,7 +37,7 @@ export default (props: Props) => {
}
}, [debouncedValueToSave]);
if (isFetching) {
if (isLoading) {
return (
<Stack space={4}>
<PlaceholderGroupSearch />