Skip to content

Commit 3f837d1

Browse files
committed
Fix hovers.
1 parent 4f3494e commit 3f837d1

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

src/components/tableV2/core/base-table.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Table.HeadCell = forwardRef(
132132
...styles,
133133
...headStyles,
134134
}}
135-
width={{ min: `${minWidth}px`, max: `${width}px` }}
135+
width={{ min: `${minWidth}px`, max: `${width}px`, base: `${width}px` }}
136136
onMouseEnter={() => onHover({ row: null, column: id })}
137137
onMouseLeave={() => onHover()}
138138
{...props}
@@ -291,7 +291,11 @@ Table.Cell = forwardRef(
291291
...pinnedStyles,
292292
...styles,
293293
}}
294-
width={{ max: `${width || maxWidth}px`, min: `${minWidth}px` }}
294+
width={{
295+
base: `${width || maxWidth}px`,
296+
max: `${width || maxWidth}px`,
297+
min: `${minWidth}px`,
298+
}}
295299
overflow="hidden"
296300
{...rest}
297301
background={

src/components/tableV2/core/rows.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ const Rows = ({
8282
onMouseEnter={() => onHover({ row: row.id, column: cell.column.id })}
8383
onMouseLeave={() => onHover()}
8484
{...cell.column.columnDef.meta}
85-
{...(coloredSortedColumn &&
85+
{...(cell.column.getCanSort() &&
86+
coloredSortedColumn &&
8687
!!cell.column.getIsSorted() && {
8788
background: "successBackground",
8889
backgroundOpacity: 0.3,

src/components/tableV2/netdataTable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ const NetdataTable = ({
197197
dataGa={dataGa}
198198
scrollParentRef={scrollParentRef}
199199
virtualizeOptions={virtualizeOptions}
200-
coloredSortedColumn={coloredSortedColumn}
200+
coloredSortedColumn={enableSorting && coloredSortedColumn}
201201
/>
202202
)}
203203
<MainTable
@@ -213,7 +213,7 @@ const NetdataTable = ({
213213
tableRef={tableRef}
214214
testPrefix={testPrefix}
215215
virtualizeOptions={virtualizeOptions}
216-
coloredSortedColumn={coloredSortedColumn}
216+
coloredSortedColumn={enableSorting && coloredSortedColumn}
217217
{...rest}
218218
/>
219219
</Flex>

0 commit comments

Comments
 (0)