Skip to content

Commit a647026

Browse files
fix(Storage): do not display group control if not available (#1449)
1 parent a64db3d commit a647026

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/containers/Storage/PaginatedStorageGroups.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ function StorageGroupsComponent({
6060
}: PaginatedStorageProps) {
6161
const {searchValue, visibleEntities, handleShowAllGroups} = useStorageQueryParams();
6262

63+
const storageGroupsHandlerHasGroupping = useStorageGroupsHandlerHasGrouping();
64+
6365
const {columnsToShow, columnsToSelect, setColumns} = useStorageGroupsSelectedColumns({
6466
visibleEntities,
6567
viewContext,
@@ -69,7 +71,7 @@ function StorageGroupsComponent({
6971
return (
7072
<StorageGroupsControls
7173
withTypeSelector
72-
withGroupBySelect
74+
withGroupBySelect={storageGroupsHandlerHasGroupping}
7375
entitiesCountCurrent={foundEntities}
7476
entitiesCountTotal={totalEntities}
7577
entitiesLoading={!inited}

src/containers/Storage/PaginatedStorageNodes.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ function StorageNodesComponent({
6868
const {searchValue, visibleEntities, nodesUptimeFilter, handleShowAllNodes} =
6969
useStorageQueryParams();
7070

71+
const viewerNodesHandlerHasGrouping = useViewerNodesHandlerHasGrouping();
72+
7173
const {columnsToShow, columnsToSelect, setColumns} = useStorageNodesColumnsToSelect({
7274
database,
7375
viewContext,
@@ -77,7 +79,7 @@ function StorageNodesComponent({
7779
return (
7880
<StorageNodesControls
7981
withTypeSelector
80-
withGroupBySelect
82+
withGroupBySelect={viewerNodesHandlerHasGrouping}
8183
entitiesCountCurrent={foundEntities}
8284
entitiesCountTotal={totalEntities}
8385
entitiesLoading={!inited}

0 commit comments

Comments
 (0)