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

Experimenting with sizing props

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2022-08-16 16:16:36 +03:00
parent f4c55e590a
commit c22eb14e91
4 changed files with 15 additions and 4 deletions

View File

@ -171,21 +171,27 @@ class NonInjectedPods extends React.Component<Dependencies> {
columnHelper.display({
id: "warning",
cell: props => <KubeObjectStatusIcon key="icon" object={props.row.original} />,
size: 30,
enableResizing: false,
}),
columnHelper.accessor(row => row.getNs(), {
id: "namespace",
header: "Namespace",
cell: info => info.getValue(),
minSize: 110,
size: 110,
}),
columnHelper.accessor(row => this.renderContainersStatus(row), {
id: "containers",
header: "Containers",
cell: info => info.getValue(),
minSize: 137,
}),
columnHelper.accessor(row => row.getRestartsCount(), {
id: "restarts",
header: "Restarts",
cell: info => info.getValue(),
minSize: 105,
}),
columnHelper.accessor(row => this.renderControlledBy(row), {
id: "controlledBy",

View File

@ -1,11 +1,8 @@
.tableTheme {
border: 1px solid lightgray;
height: calc(100% - 59px);
overflow: auto;
table {
border-spacing: 0;
border-top: thin solid var(--hrColor);
table-layout: fixed;
width: 100%;
}

View File

@ -47,6 +47,9 @@ export function TableList<Data>({
}}
/>
),
enableResizing: false,
minSize: 21,
size: 21,
})
)
}
@ -56,6 +59,8 @@ export function TableList<Data>({
columnHelper.display({
id: "config",
header: () => <ColumnConfigMenu table={table}/>,
size: 30,
enableResizing: false,
})
)
}
@ -74,6 +79,9 @@ export function TableList<Data>({
getSortedRowModel: getSortedRowModel(),
enableColumnResizing: true,
columnResizeMode: 'onChange',
defaultColumn: {
size: 100,
}
});
return (

View File

@ -9,7 +9,7 @@
top: 0;
height: 100%;
width: 5px;
background: rgba(0, 0, 0, 0.5);
background: #ccc;
cursor: col-resize;
user-select: none;
touch-action: none;