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:
parent
f4c55e590a
commit
c22eb14e91
@ -171,21 +171,27 @@ class NonInjectedPods extends React.Component<Dependencies> {
|
|||||||
columnHelper.display({
|
columnHelper.display({
|
||||||
id: "warning",
|
id: "warning",
|
||||||
cell: props => <KubeObjectStatusIcon key="icon" object={props.row.original} />,
|
cell: props => <KubeObjectStatusIcon key="icon" object={props.row.original} />,
|
||||||
|
size: 30,
|
||||||
|
enableResizing: false,
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor(row => row.getNs(), {
|
columnHelper.accessor(row => row.getNs(), {
|
||||||
id: "namespace",
|
id: "namespace",
|
||||||
header: "Namespace",
|
header: "Namespace",
|
||||||
cell: info => info.getValue(),
|
cell: info => info.getValue(),
|
||||||
|
minSize: 110,
|
||||||
|
size: 110,
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor(row => this.renderContainersStatus(row), {
|
columnHelper.accessor(row => this.renderContainersStatus(row), {
|
||||||
id: "containers",
|
id: "containers",
|
||||||
header: "Containers",
|
header: "Containers",
|
||||||
cell: info => info.getValue(),
|
cell: info => info.getValue(),
|
||||||
|
minSize: 137,
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor(row => row.getRestartsCount(), {
|
columnHelper.accessor(row => row.getRestartsCount(), {
|
||||||
id: "restarts",
|
id: "restarts",
|
||||||
header: "Restarts",
|
header: "Restarts",
|
||||||
cell: info => info.getValue(),
|
cell: info => info.getValue(),
|
||||||
|
minSize: 105,
|
||||||
}),
|
}),
|
||||||
columnHelper.accessor(row => this.renderControlledBy(row), {
|
columnHelper.accessor(row => this.renderControlledBy(row), {
|
||||||
id: "controlledBy",
|
id: "controlledBy",
|
||||||
|
|||||||
@ -1,11 +1,8 @@
|
|||||||
.tableTheme {
|
.tableTheme {
|
||||||
border: 1px solid lightgray;
|
|
||||||
height: calc(100% - 59px);
|
height: calc(100% - 59px);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
||||||
table {
|
table {
|
||||||
border-spacing: 0;
|
|
||||||
border-top: thin solid var(--hrColor);
|
|
||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,6 +47,9 @@ export function TableList<Data>({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
enableResizing: false,
|
||||||
|
minSize: 21,
|
||||||
|
size: 21,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -56,6 +59,8 @@ export function TableList<Data>({
|
|||||||
columnHelper.display({
|
columnHelper.display({
|
||||||
id: "config",
|
id: "config",
|
||||||
header: () => <ColumnConfigMenu table={table}/>,
|
header: () => <ColumnConfigMenu table={table}/>,
|
||||||
|
size: 30,
|
||||||
|
enableResizing: false,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -74,6 +79,9 @@ export function TableList<Data>({
|
|||||||
getSortedRowModel: getSortedRowModel(),
|
getSortedRowModel: getSortedRowModel(),
|
||||||
enableColumnResizing: true,
|
enableColumnResizing: true,
|
||||||
columnResizeMode: 'onChange',
|
columnResizeMode: 'onChange',
|
||||||
|
defaultColumn: {
|
||||||
|
size: 100,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 5px;
|
width: 5px;
|
||||||
background: rgba(0, 0, 0, 0.5);
|
background: #ccc;
|
||||||
cursor: col-resize;
|
cursor: col-resize;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
touch-action: none;
|
touch-action: none;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user