Fix row copy selection and table bottom spacing placement
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
position: relative;
|
||||
overflow: auto; /* ✅ Разрешаем прокрутку */
|
||||
min-height: 0;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
/* ✅ Стили для меню столбцов */
|
||||
@@ -455,8 +456,6 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
padding-bottom: 16px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
@@ -46,8 +46,15 @@ function updateSelectionCounter() {
|
||||
|
||||
let count = 0;
|
||||
if (table) {
|
||||
const tabulatorSelected = table.getSelectedData();
|
||||
count = tabulatorSelected.length + selectedRowsDataGlobal.size;
|
||||
const allSelectedData = new Map();
|
||||
table.getSelectedData().forEach(rowData => {
|
||||
const key = getRowKey(rowData);
|
||||
allSelectedData.set(key, rowData);
|
||||
});
|
||||
selectedRowsDataGlobal.forEach((rowData, key) => {
|
||||
allSelectedData.set(key, rowData);
|
||||
});
|
||||
count = allSelectedData.size;
|
||||
} else {
|
||||
count = selectedRowsDataGlobal.size;
|
||||
}
|
||||
|
||||
@@ -329,8 +329,15 @@ async function showExportDialog() {
|
||||
const hasTable = currentSchema && currentTable && table;
|
||||
let selectedCount = 0;
|
||||
if (hasTable) {
|
||||
const tabulatorSelected = table.getSelectedData();
|
||||
selectedCount = tabulatorSelected.length + selectedRowsDataGlobal.size;
|
||||
const allSelectedData = new Map();
|
||||
table.getSelectedData().forEach(rowData => {
|
||||
const key = getRowKey(rowData);
|
||||
allSelectedData.set(key, rowData);
|
||||
});
|
||||
selectedRowsDataGlobal.forEach((rowData, key) => {
|
||||
allSelectedData.set(key, rowData);
|
||||
});
|
||||
selectedCount = allSelectedData.size;
|
||||
}
|
||||
|
||||
const modal = document.createElement('div');
|
||||
|
||||
@@ -454,7 +454,7 @@ async function selectTable(schema, tableName, restoreState = false) {
|
||||
console.log('🏗️ Создание Tabulator...');
|
||||
|
||||
table = new Tabulator("#table", {
|
||||
selectableRows: false,
|
||||
selectableRows: true,
|
||||
selectableRowsPersistence: true,
|
||||
columns: columns,
|
||||
layout: "fitDataStretch",
|
||||
@@ -652,6 +652,14 @@ async function selectTable(schema, tableName, restoreState = false) {
|
||||
checkbox.checked = row.isSelected();
|
||||
}
|
||||
}
|
||||
|
||||
const rowData = row.getData();
|
||||
const key = getRowKey(rowData);
|
||||
if (row.isSelected()) {
|
||||
selectedRowsDataGlobal.set(key, rowData);
|
||||
} else {
|
||||
selectedRowsDataGlobal.delete(key);
|
||||
}
|
||||
});
|
||||
updateSelectionCounter();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user