Skip to content

Commit 313b079

Browse files
committed
v5.0.35
1 parent a7252b9 commit 313b079

12 files changed

Lines changed: 685 additions & 719 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@netdata/netdata-ui",
3-
"version": "5.0.34",
3+
"version": "5.0.35",
44
"description": "netdata UI kit",
55
"main": "dist/index.js",
66
"module": "dist/es6/index.js",

src/components/table/body/header/cell.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ const BodyHeaderCell = ({
100100
</Label>
101101
)}
102102
<Sorting sortable={column.getCanSort()} sorting={column.getIsSorted()} />
103+
<Info meta={meta} />
103104
</LabelContainer>
104105
<Filter column={column} testPrefix={testPrefix} index={index} />
105106
</Flex>
106-
<Info meta={meta} />
107107
<ResizeHandler header={header} table={table} />
108108
{children}
109109
</Flex>

src/components/table/body/header/info.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const Info = ({ meta }) => {
99
if (!tooltipText) return null
1010

1111
return (
12-
<Flex position="absolute" top="1px" right="1px" width={3} height={3}>
12+
<Flex width={3} height={3}>
1313
<Tooltip align="bottom" content={tooltipText}>
1414
<Icon color="nodeBadgeColor" size="small" name="information" />
1515
</Tooltip>

src/components/table/body/index.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { memo, useCallback, useRef, useEffect } from "react"
22
import { useVirtualizer, defaultRangeExtractor } from "@tanstack/react-virtual"
33
import identity from "lodash/identity"
4+
import Flex from "@/components/templates/flex"
45
import { useTableState } from "../provider"
56
import Row from "./row"
67
import Header from "./header"
@@ -91,17 +92,14 @@ const Body = memo(
9192
}, [virtualRows, getHasPrevPage(), loading])
9293

9394
return (
94-
<div
95+
<Flex
9596
ref={ref}
96-
style={{
97-
display: "flex",
98-
height: "100%",
99-
overflow: "auto",
100-
flex: "1",
101-
// maxWidth: `min(${table.getTotalSize()}, 100%)`, // WHY: Removing since it causes issues with fullWidth cells
102-
}}
97+
height="100%"
98+
overflow="auto"
99+
flex="1"
103100
data-testid={`netdata-table${testPrefix}`}
104101
onScroll={onScroll}
102+
border
105103
>
106104
<div
107105
style={{
@@ -155,7 +153,7 @@ const Body = memo(
155153
)
156154
})}
157155
</div>
158-
</div>
156+
</Flex>
159157
)
160158
}
161159
)

src/components/table/header/actions/columnVisibility/columnsMenu.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ const ColumnsMenu = ({
115115
columns={pinnedColumns}
116116
searchQuery={searchQuery}
117117
dataGa={dataGa}
118-
title="Pinned"
119118
showBorder
120119
/>
121120
{columnGroups?.length ? (

src/components/table/header/actions/columnVisibility/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ import { useTableState } from "../../../provider"
77

88
const rerenderSelector = state => state.columnVisibility
99

10+
const excludedById = {
11+
selectionColumn: true,
12+
rowActionsColumn: true,
13+
}
14+
1015
const ColumnVisibilityAction = ({
1116
alwaysEnabled,
1217
columnPinning = {},
@@ -35,6 +40,8 @@ const ColumnVisibilityAction = ({
3540

3641
table.getHeaderGroups().forEach(headerGroup => {
3742
headerGroup.headers.forEach(header => {
43+
if (excludedById[header.column.id]) return
44+
3845
if (header.column.columns && header.column.columns.length > 0) {
3946
const groupColumns = header.column.columns.filter(col => col.getCanHide())
4047
if (groupColumns.length > 0) {
@@ -54,7 +61,7 @@ const ColumnVisibilityAction = ({
5461
})
5562

5663
return groups
57-
}, [table])
64+
}, [table.getAllLeafColumns()])
5865

5966
const allColumns = useMemo(
6067
() =>
@@ -89,6 +96,7 @@ const ColumnVisibilityAction = ({
8996
{ columns: [], pinnedColumns: [] }
9097
)
9198
: { columns: allColumns, pinnedColumns: [] }
99+
92100
return (
93101
<>
94102
<BulkAction

src/components/table/header/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ const Header = ({
3838
background="mainBackground"
3939
gap={1}
4040
alignItems="center"
41-
padding={[1]}
41+
padding={[2, 3]}
42+
round
43+
border={{ side: ["vertical", "top"] }}
4244
{...tableMeta.bulkActionsStyles}
4345
>
4446
{typeof title === "string" ? <TextBig strong>{title}</TextBig> : title}

0 commit comments

Comments
 (0)