Теперь заголовок и ячейки столбца с чекбоксами должны иметь одинаковую ширину (40px) и одинаковый padding (4px), что устраняет несоответствие.
This commit is contained in:
@@ -634,15 +634,39 @@ async function selectTable(schema, tableName) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (checkboxColumn) {
|
if (checkboxColumn) {
|
||||||
// Принудительно устанавливаем ширину
|
// Принудительно устанавливаем ширину для столбца
|
||||||
const element = checkboxColumn.getElement();
|
const element = checkboxColumn.getElement();
|
||||||
if (element) {
|
if (element) {
|
||||||
element.style.width = '40px';
|
element.style.width = '40px';
|
||||||
element.style.minWidth = '40px';
|
element.style.minWidth = '40px';
|
||||||
element.style.maxWidth = '40px';
|
element.style.maxWidth = '40px';
|
||||||
element.style.flex = '0 0 40px';
|
element.style.flex = '0 0 40px';
|
||||||
|
element.style.padding = '0';
|
||||||
|
element.style.boxSizing = 'border-box';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ✅ Также устанавливаем ширину для ячейки заголовка
|
||||||
|
setTimeout(() => {
|
||||||
|
const headerCell = element?.querySelector('.tabulator-cell');
|
||||||
|
if (headerCell) {
|
||||||
|
headerCell.style.width = '40px';
|
||||||
|
headerCell.style.minWidth = '40px';
|
||||||
|
headerCell.style.maxWidth = '40px';
|
||||||
|
headerCell.style.padding = '4px';
|
||||||
|
headerCell.style.boxSizing = 'border-box';
|
||||||
|
}
|
||||||
|
|
||||||
|
// ✅ Устанавливаем ширину для всех ячеек данных в этом столбце
|
||||||
|
const dataCells = document.querySelectorAll('.tabulator-row .tabulator-cell:first-child');
|
||||||
|
dataCells.forEach(cell => {
|
||||||
|
cell.style.width = '40px';
|
||||||
|
cell.style.minWidth = '40px';
|
||||||
|
cell.style.maxWidth = '40px';
|
||||||
|
cell.style.padding = '4px';
|
||||||
|
cell.style.boxSizing = 'border-box';
|
||||||
|
});
|
||||||
|
}, 50);
|
||||||
|
|
||||||
console.log('✅ Ширина столбца чекбоксов зафиксирована');
|
console.log('✅ Ширина столбца чекбоксов зафиксирована');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -247,25 +247,30 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ✅ ИСКЛЮЧЕНИЕ: столбец с чекбоксами - фиксированная ширина */
|
/* ✅ ИСКЛЮЧЕНИЕ: столбец с чекбоксами - фиксированная ширина */
|
||||||
|
/* Таргетируем столбец rowSelection по всем возможным селекторам */
|
||||||
.tabulator-col.tabulator-row-handle,
|
.tabulator-col.tabulator-row-handle,
|
||||||
.tabulator-col[tabulator-field=""] {
|
.tabulator-col[tabulator-field=""],
|
||||||
|
.tabulator-col:first-child {
|
||||||
width: 40px !important;
|
width: 40px !important;
|
||||||
min-width: 40px !important;
|
min-width: 40px !important;
|
||||||
max-width: 40px !important;
|
max-width: 40px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ✅ Заголовок столбца с чекбоксами */
|
/* ✅ Заголовок столбца с чекбоксами - убираем лишний padding */
|
||||||
.tabulator-header .tabulator-col.tabulator-row-handle,
|
.tabulator-header .tabulator-col.tabulator-row-handle,
|
||||||
.tabulator-header .tabulator-col[tabulator-field=""] {
|
.tabulator-header .tabulator-col[tabulator-field=""],
|
||||||
|
.tabulator-header .tabulator-col:first-child {
|
||||||
width: 40px !important;
|
width: 40px !important;
|
||||||
min-width: 40px !important;
|
min-width: 40px !important;
|
||||||
max-width: 40px !important;
|
max-width: 40px !important;
|
||||||
flex: 0 0 40px !important;
|
flex: 0 0 40px !important;
|
||||||
|
padding: 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ✅ Ячейки заголовка столбца с чекбоксами */
|
/* ✅ Ячейки заголовка столбца с чекбоксами - одинаковый padding с ячейками */
|
||||||
.tabulator-header .tabulator-cell.tabulator-row-handle,
|
.tabulator-header .tabulator-cell.tabulator-row-handle,
|
||||||
.tabulator-header .tabulator-cell[tabulator-field=""] {
|
.tabulator-header .tabulator-cell[tabulator-field=""],
|
||||||
|
.tabulator-header .tabulator-cell:first-child {
|
||||||
width: 40px !important;
|
width: 40px !important;
|
||||||
min-width: 40px !important;
|
min-width: 40px !important;
|
||||||
max-width: 40px !important;
|
max-width: 40px !important;
|
||||||
@@ -274,7 +279,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ✅ Ячейки столбца с чекбоксами */
|
/* ✅ Ячейки столбца с чекбоксами */
|
||||||
.tabulator-cell[tabulator-field=""] {
|
.tabulator-cell[tabulator-field=""],
|
||||||
|
.tabulator-row .tabulator-cell:first-child {
|
||||||
width: 40px !important;
|
width: 40px !important;
|
||||||
min-width: 40px !important;
|
min-width: 40px !important;
|
||||||
max-width: 40px !important;
|
max-width: 40px !important;
|
||||||
|
|||||||
Reference in New Issue
Block a user