Client: Table: fixed index column size

This commit is contained in:
Dmitry Sychugov 2024-05-30 15:25:45 +05:00
parent b7517458df
commit 410b2814c7
3 changed files with 8 additions and 2 deletions

View File

@ -363,7 +363,10 @@ class FilesTableHeader extends React.Component {
key: "Index",
title: "#",
enable: this.props.indexColumnIsEnabled,
// defaultSize: 110,
minWidth: 75,
resizable: false,
shortColumn: true,
onChange: this.onColumnChange,
});
}

View File

@ -50,6 +50,7 @@ export type TTableColumn = {
defaultSize?: number;
default?: boolean;
resizable?: boolean;
shortColumn?: boolean;
checkbox?: {
value: boolean;
isIndeterminate: boolean;

View File

@ -911,7 +911,7 @@ import { checkingForUnfixedSize, getSubstring } from "./Table.utils";
const defaultMinColumnSize = 110;
const settingsSize = 24;
const minSizeFirstColumn = 110;
const minSizeFirstColumn = 75;
class TableHeader extends React.Component<
TableHeaderProps,
@ -1729,6 +1729,8 @@ class TableHeader extends React.Component<
for (const col of columns) {
if (col.default) {
str += `${wideColumnSize} `;
} else if (col.shortColumn) {
str += `${col.minWidth}px `;
} else
str += col.enable
? col.defaultSize