check box table fi

This commit is contained in:
Mikhail Chusavitin
2026-01-21 19:13:19 +03:00
parent 74ebea7077
commit 0d9436977e
2 changed files with 46 additions and 13 deletions

View File

@@ -420,8 +420,13 @@ async function selectTable(schema, tableName) {
formatter: "rowSelection",
titleFormatter: "rowSelection",
hozAlign: "center",
headerHozAlign: "center", // ✅ Выравнивание заголовка
headerSort: false,
width: 40,
width: 40, // ✅ Фиксированная ширина
minWidth: 40, // ✅ Минимальная ширина
maxWidth: 40, // ✅ Максимальная ширина
resizable: false, // ✅ Запрещаем изменение размера
frozen: true, // ✅ Опционально: зафиксировать при прокрутке
cellClick: function(e, cell) {
e.stopPropagation();
cell.getRow().toggleSelect();
@@ -562,11 +567,14 @@ async function selectTable(schema, tableName) {
selectableRowsCheck: function(row) { return true; },
columns: columns,
layout: "fitDataStretch", // ✅ Изменено - растягивает столбцы для заполнения + подгоняет под данные
layout: "fitDataStretch",
resizableColumns: true,
resizableColumnFit: false,
columnMinWidth: 100,
columnMinWidth: 100, // ✅ Применяется ко всем столбцам кроме явно указанных
columnDefaults: { // ✅ Дефолтные параметры для всех столбцов
resizable: true
},
pagination: true,
paginationMode: "remote",

View File

@@ -265,11 +265,6 @@
.tabulator .tabulator-header {
background-color: #f5f5f5;
border-bottom: 2px solid #ddd;
overflow: visible !important; /* Важно для синхронизации */
}
.tabulator .tabulator-header .tabulator-col {
background-color: #f5f5f5;
}
.tabulator .tabulator-tableholder {
@@ -280,17 +275,47 @@
width: auto !important;
}
/* ✅ Минимальная ширина столбцов */
/* ✅ Минимальная ширина столбцов (кроме служебных) */
.tabulator-col {
min-width: 100px !important;
}
/* ✅ Фиксируем первый столбец с чекбоксами */
/* ✅ ИСКЛЮЧЕНИЕ: столбец с чекбоксами - фиксированная ширина */
.tabulator-col.tabulator-row-handle {
width: 40px !important;
min-width: 40px !important;
max-width: 40px !important;
}
.tabulator-col[tabulator-field=""] {
width: 40px !important;
min-width: 40px !important;
max-width: 40px !important;
}
/* ✅ Заголовок столбца с чекбоксами */
.tabulator-header .tabulator-col.tabulator-row-handle,
.tabulator-header .tabulator-col[tabulator-field=""] {
width: 40px !important;
min-width: 40px !important;
max-width: 40px !important;
flex: 0 0 40px !important;
}
/* ✅ Ячейки столбца с чекбоксами */
.tabulator-cell[tabulator-field=""],
.tabulator-row .tabulator-cell:first-child {
width: 40px !important;
min-width: 40px !important;
max-width: 40px !important;
padding: 4px !important;
}
/* ✅ Чекбокс внутри ячейки */
.tabulator-row-handle {
width: 40px !important;
}
</style>
</head>