Skip to content

Commit 1d8cca3

Browse files
committed
v4.5.10
1 parent 07b4753 commit 1d8cca3

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

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": "4.5.9",
3+
"version": "4.5.10",
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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const BodyHeaderCell = ({
4747
index,
4848
children,
4949
isSubheader,
50+
hasSubheaders,
5051
}) => {
5152
useTableState(rerenderSelector)
5253

@@ -83,7 +84,7 @@ const BodyHeaderCell = ({
8384
background: "columnHighlight",
8485
backgroundOpacity: "0.2",
8586
})}
86-
padding={isSubheader ? [1, 2] : [0]}
87+
padding={!hasSubheaders || isSubheader ? [1, 2] : [0]}
8788
{...headStyles}
8889
column
8990
>
@@ -92,7 +93,7 @@ const BodyHeaderCell = ({
9293
alignItems="center"
9394
cursor={column.getCanSort() ? "pointer" : "default"}
9495
onClick={column.getCanSort() ? column.getToggleSortingHandler() : undefined}
95-
padding={[0, 2, 0, 0]}
96+
padding={[0, 2, 0, !hasSubheaders || isSubheader ? 0 : 2]}
9697
overflow="hidden"
9798
width="100%"
9899
>

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ const HeaderGroup = ({ id, headers, testPrefix, ...rest }) => {
1818
return (
1919
<Flex id={id} data-testid={`netdata-table-headRow${testPrefix}`} flex background="tableRowBg2">
2020
{headers.map((header, index) => (
21-
<Cell key={header.id} index={index} {...rest} header={header} testPrefix={testPrefix}>
21+
<Cell
22+
key={header.id}
23+
index={index}
24+
{...rest}
25+
header={header}
26+
testPrefix={testPrefix}
27+
hasSubheaders={!!header.subHeaders.length}
28+
>
2229
{!!header.subHeaders.length && (
2330
<HeaderGroup
2431
headers={header.subHeaders}

src/components/table/header/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const Header = ({
3636
background="mainBackground"
3737
gap={1}
3838
alignItems="center"
39-
padding={[1, 0]}
39+
padding={[1]}
4040
{...tableMeta.bulkActionsStyles}
4141
>
4242
{typeof title === "string" ? <TextBig strong>{title}</TextBig> : title}

0 commit comments

Comments
 (0)