mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Highlight virtual rows on hover
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
8ae993d8ea
commit
8d9ac313ad
@ -54,4 +54,22 @@
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
// Virtual table styles
|
||||
tbody > div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding: 0 calc(var(--padding) * 2);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--tableBgcSelected);
|
||||
}
|
||||
|
||||
> div {
|
||||
padding: 4px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
tr {
|
||||
display: flex;
|
||||
padding: 0 16px;
|
||||
}
|
||||
|
||||
th {
|
||||
|
||||
@ -25,7 +25,7 @@ import { prevDefault } from "../../utils";
|
||||
estimateSize: () => 55,
|
||||
overscan: 5,
|
||||
count: rows.length,
|
||||
paddingStart: 50 // header width
|
||||
paddingStart: 50 // header height
|
||||
})
|
||||
|
||||
return (
|
||||
@ -46,12 +46,7 @@ import { prevDefault } from "../../utils";
|
||||
key={virtualRow.index}
|
||||
ref={virtualRow.measureElement}
|
||||
style={{
|
||||
position: 'absolute',
|
||||
top: 0,
|
||||
left: 0,
|
||||
width: '100%',
|
||||
transform: `translateY(${virtualRow.start}px)`,
|
||||
display: 'flex',
|
||||
cursor: onRowClick ? 'pointer' : 'default',
|
||||
}}
|
||||
onClick={prevDefault(() => onRowClick?.(row.original))}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user