diff --git a/public/index.html b/public/index.html
index dbd9f39..3401611 100644
--- a/public/index.html
+++ b/public/index.html
@@ -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;
}
diff --git a/public/js/core.js b/public/js/core.js
index bb8e7c9..30aa27d 100644
--- a/public/js/core.js
+++ b/public/js/core.js
@@ -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;
}
diff --git a/public/js/io.js b/public/js/io.js
index 58fb643..407638f 100644
--- a/public/js/io.js
+++ b/public/js/io.js
@@ -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');
diff --git a/public/js/table.js b/public/js/table.js
index 2858f68..a99a33d 100644
--- a/public/js/table.js
+++ b/public/js/table.js
@@ -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();
});