1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix .TableHead.sticky in for details panels (#3331)

* Fix .TableHead.sticky in for details panels

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fine-tune TableHead styling in PodDetailsList

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Sebastian Malton 2021-07-14 05:31:58 -04:00 committed by GitHub
parent f2cd0aa8e8
commit 9c2942c333
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -54,7 +54,7 @@ export class NodeDetailsResources extends React.Component<Props> {
selectable selectable
scrollable={false} scrollable={false}
> >
<TableHead> <TableHead sticky={false}>
<TableCell className="cpu">CPU</TableCell> <TableCell className="cpu">CPU</TableCell>
<TableCell className="memory">Memory</TableCell> <TableCell className="memory">Memory</TableCell>
<TableCell className="ephemeral-storage">Ephemeral Storage</TableCell> <TableCell className="ephemeral-storage">Ephemeral Storage</TableCell>

View File

@ -28,6 +28,10 @@
&.virtual { &.virtual {
height: 500px; height: 500px;
} }
.TableHead.sticky {
top: calc(var(--spacing) * -1);
}
} }
.TableCell { .TableCell {

View File

@ -38,7 +38,7 @@
position: -webkit-sticky; // safari position: -webkit-sticky; // safari
position: sticky; position: sticky;
z-index: 1; z-index: 1;
top: 0; // turn on sticky behaviour top: 0;
} }
&.nowrap { &.nowrap {
@ -48,6 +48,7 @@
.TableCell { .TableCell {
display: flex; display: flex;
align-items: center; align-items: center;
word-break: normal;
&.checkbox { &.checkbox {
> .Checkbox { > .Checkbox {
@ -55,4 +56,4 @@
} }
} }
} }
} }