mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-26 09:26:22 +00:00
fix(summaryTab): fix empty state when assets were deleted (#14777)
This commit is contained in:
parent
d090c1da4a
commit
6fdeb84785
@ -21,7 +21,7 @@ export function InfiniteScrollList<T>({
|
||||
|
||||
return (
|
||||
<>
|
||||
{items.length === 0 && totalItemCount === 0 && !loading && emptyState}
|
||||
{items.length === 0 && !loading && emptyState}
|
||||
{items.map((item) => renderItem(item))}
|
||||
{hasMore && <ObserverContainer ref={observerRef} />}
|
||||
{items.length > 0 && showLoader && loading && <Loader size="sm" alignItems="center" />}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { InfiniteScrollList } from '@components';
|
||||
import React, { useCallback, useMemo, useState } from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import EmptyContent from '@app/homeV3/module/components/EmptyContent';
|
||||
import EntityItem from '@app/homeV3/module/components/EntityItem';
|
||||
@ -13,6 +14,10 @@ import { convertLogicalPredicateToOrFilters } from '@app/sharedV2/queryBuilder/b
|
||||
import { useGetSearchResultsForMultipleQuery } from '@graphql/search.generated';
|
||||
import { DataHubPageModuleType, Entity } from '@types';
|
||||
|
||||
const ContentWrapper = styled.div`
|
||||
height: 100%;
|
||||
`;
|
||||
|
||||
const DEFAULT_PAGE_SIZE = 10;
|
||||
|
||||
const AssetCollectionModule = (props: ModuleProps) => {
|
||||
@ -152,7 +157,7 @@ const AssetCollectionModule = (props: ModuleProps) => {
|
||||
|
||||
return (
|
||||
<LargeModule {...props} loading={loading} dataTestId="asset-collection-module">
|
||||
<div data-testid="asset-collection-entities">
|
||||
<ContentWrapper data-testid="asset-collection-entities">
|
||||
<InfiniteScrollList<Entity>
|
||||
key={assetUrns.join(',')}
|
||||
fetchData={fetchEntities}
|
||||
@ -173,7 +178,7 @@ const AssetCollectionModule = (props: ModuleProps) => {
|
||||
}
|
||||
totalItemCount={totalForInfiniteScroll}
|
||||
/>
|
||||
</div>
|
||||
</ContentWrapper>
|
||||
</LargeModule>
|
||||
);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user