mirror of https://github.com/buster-so/buster.git
fix empty state problems
This commit is contained in:
parent
0174daf77e
commit
11f2f3e550
|
@ -134,7 +134,12 @@ export const DatasetGroupDatasetsListContainer: React.FC<{
|
|||
useRowClickSelectChange={false}
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
onSelectChange={setSelectedRowKeys}
|
||||
emptyState={<EmptyStateList text="No dataset groups found" />}
|
||||
emptyState={useMemo(
|
||||
() => (
|
||||
<EmptyStateList text="No dataset groups found" />
|
||||
),
|
||||
[]
|
||||
)}
|
||||
/>
|
||||
</InfiniteListContainer>
|
||||
);
|
||||
|
|
|
@ -134,7 +134,12 @@ export const DatasetGroupDatasetGroupsListContainer: React.FC<{
|
|||
useRowClickSelectChange={false}
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
onSelectChange={setSelectedRowKeys}
|
||||
emptyState={<EmptyStateList text="No dataset groups found" />}
|
||||
emptyState={useMemo(
|
||||
() => (
|
||||
<EmptyStateList text="No dataset groups found" />
|
||||
),
|
||||
[]
|
||||
)}
|
||||
/>
|
||||
</InfiniteListContainer>
|
||||
);
|
||||
|
|
|
@ -138,7 +138,12 @@ export const DatasetGroupUsersListContainer: React.FC<{
|
|||
useRowClickSelectChange={false}
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
onSelectChange={setSelectedRowKeys}
|
||||
emptyState={<EmptyStateList text="No dataset groups found" />}
|
||||
emptyState={useMemo(
|
||||
() => (
|
||||
<EmptyStateList text="No dataset groups found" />
|
||||
),
|
||||
[]
|
||||
)}
|
||||
/>
|
||||
</InfiniteListContainer>
|
||||
);
|
||||
|
|
|
@ -54,7 +54,12 @@ export const ListPermissionGroupsComponent: React.FC<{
|
|||
showHeader={true}
|
||||
showSelectAll={false}
|
||||
rowClassName="pl-[30px]!"
|
||||
emptyState={<EmptyStateList text="No permission groups found" />}
|
||||
emptyState={useMemo(
|
||||
() => (
|
||||
<EmptyStateList text="No permission groups found" />
|
||||
),
|
||||
[]
|
||||
)}
|
||||
/>
|
||||
</InfiniteListContainer>
|
||||
);
|
||||
|
|
|
@ -129,7 +129,12 @@ export const PermissionGroupDatasetGroupsListContainer: React.FC<{
|
|||
useRowClickSelectChange={false}
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
onSelectChange={setSelectedRowKeys}
|
||||
emptyState={<EmptyStateList text="No dataset groups found" />}
|
||||
emptyState={useMemo(
|
||||
() => (
|
||||
<EmptyStateList text="No dataset groups found" />
|
||||
),
|
||||
[]
|
||||
)}
|
||||
/>
|
||||
</InfiniteListContainer>
|
||||
);
|
||||
|
|
|
@ -134,7 +134,12 @@ export const PermissionGroupDatasetsListContainer: React.FC<{
|
|||
useRowClickSelectChange={false}
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
onSelectChange={setSelectedRowKeys}
|
||||
emptyState={<EmptyStateList text="No dataset groups found" />}
|
||||
emptyState={useMemo(
|
||||
() => (
|
||||
<EmptyStateList text="No dataset groups found" />
|
||||
),
|
||||
[]
|
||||
)}
|
||||
/>
|
||||
</InfiniteListContainer>
|
||||
);
|
||||
|
|
|
@ -133,7 +133,12 @@ export const PermissionGroupUsersListContainer: React.FC<{
|
|||
useRowClickSelectChange={false}
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
onSelectChange={setSelectedRowKeys}
|
||||
emptyState={<EmptyStateList text="No dataset groups found" />}
|
||||
emptyState={useMemo(
|
||||
() => (
|
||||
<EmptyStateList text="No dataset groups found" />
|
||||
),
|
||||
[]
|
||||
)}
|
||||
/>
|
||||
</InfiniteListContainer>
|
||||
);
|
||||
|
|
|
@ -44,7 +44,12 @@ export const UserAttributesListContainer: React.FC<{
|
|||
showHeader={true}
|
||||
showSelectAll={false}
|
||||
useRowClickSelectChange={false}
|
||||
emptyState={<EmptyStateList text="No datasets found" />}
|
||||
emptyState={useMemo(
|
||||
() => (
|
||||
<EmptyStateList text="No datasets found" />
|
||||
),
|
||||
[]
|
||||
)}
|
||||
/>
|
||||
</InfiniteListContainer>
|
||||
);
|
||||
|
|
|
@ -130,7 +130,12 @@ export const UserDatasetsListContainer: React.FC<{
|
|||
useRowClickSelectChange={false}
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
onSelectChange={setSelectedRowKeys}
|
||||
emptyState={<EmptyStateList text="No datasets found" />}
|
||||
emptyState={useMemo(
|
||||
() => (
|
||||
<EmptyStateList text="No datasets found" />
|
||||
),
|
||||
[]
|
||||
)}
|
||||
/>
|
||||
</InfiniteListContainer>
|
||||
);
|
||||
|
|
|
@ -136,7 +136,12 @@ export const UserPermissionGroupsListContainer: React.FC<{
|
|||
useRowClickSelectChange={false}
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
onSelectChange={setSelectedRowKeys}
|
||||
emptyState={<EmptyStateList text="No permission groups found" />}
|
||||
emptyState={useMemo(
|
||||
() => (
|
||||
<EmptyStateList text="No permission groups found" />
|
||||
),
|
||||
[]
|
||||
)}
|
||||
/>
|
||||
</InfiniteListContainer>
|
||||
);
|
||||
|
|
|
@ -117,7 +117,12 @@ export const ChatItemsContainer: React.FC<{
|
|||
columns={columns}
|
||||
onSelectChange={onSelectChange}
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
emptyState={<EmptyState loading={loading} type={type} />}
|
||||
emptyState={useMemo(
|
||||
() => (
|
||||
<EmptyState loading={loading} type={type} />
|
||||
),
|
||||
[loading, type]
|
||||
)}
|
||||
/>
|
||||
|
||||
<ChatSelectedOptionPopup
|
||||
|
|
|
@ -84,19 +84,21 @@ export const DatasetListContent: React.FC<{
|
|||
rows={rows}
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
onSelectChange={setSelectedRowKeys}
|
||||
emptyState={
|
||||
!isFetchedDatasets ? (
|
||||
<></>
|
||||
) : (
|
||||
<ListEmptyStateWithButton
|
||||
isAdmin={isAdmin}
|
||||
title="You don't have any datasets yet."
|
||||
buttonText="New dataset"
|
||||
description="Datasets help you organize your data. Datasets will appear here when you create them."
|
||||
onClick={onClickEmptyState}
|
||||
/>
|
||||
)
|
||||
}
|
||||
emptyState={useMemo(
|
||||
() =>
|
||||
!isFetchedDatasets ? (
|
||||
<></>
|
||||
) : (
|
||||
<ListEmptyStateWithButton
|
||||
isAdmin={isAdmin}
|
||||
title="You don't have any datasets yet."
|
||||
buttonText="New dataset"
|
||||
description="Datasets help you organize your data. Datasets will appear here when you create them."
|
||||
onClick={onClickEmptyState}
|
||||
/>
|
||||
),
|
||||
[isFetchedDatasets, isAdmin, onClickEmptyState]
|
||||
)}
|
||||
/>
|
||||
|
||||
<DatasetSelectedOptionPopup
|
||||
|
|
|
@ -116,7 +116,12 @@ export const MetricItemsContainer: React.FC<{
|
|||
columns={columns}
|
||||
onSelectChange={onSelectChange}
|
||||
selectedRowKeys={selectedRowKeys}
|
||||
emptyState={<EmptyState loading={loading} />}
|
||||
emptyState={useMemo(
|
||||
() => (
|
||||
<EmptyState loading={loading} />
|
||||
),
|
||||
[loading]
|
||||
)}
|
||||
/>
|
||||
|
||||
<MetricSelectedOptionPopup
|
||||
|
|
Loading…
Reference in New Issue