mirror of
https://github.com/Wx-2025/ST-Amily2-Chat-Optimisation.git
synced 2026-06-06 16:15:50 +00:00
Update table-bindings.js
This commit is contained in:
@@ -320,14 +320,13 @@ export function renderTables() {
|
||||
}
|
||||
|
||||
const highlights = TableManager.getHighlights();
|
||||
const fragment = document.createDocumentFragment();
|
||||
|
||||
const placeholder = document.getElementById('add-table-placeholder');
|
||||
if (placeholder) {
|
||||
placeholder.remove();
|
||||
}
|
||||
|
||||
container.innerHTML = '';
|
||||
|
||||
tables.forEach((tableData, tableIndex) => {
|
||||
const header = document.createElement('div');
|
||||
header.style.display = 'flex';
|
||||
@@ -349,7 +348,7 @@ export function renderTables() {
|
||||
`;
|
||||
header.appendChild(title);
|
||||
header.appendChild(controls);
|
||||
container.appendChild(header);
|
||||
fragment.appendChild(header);
|
||||
|
||||
const tableWrapper = document.createElement('div');
|
||||
tableWrapper.className = 'amily2-table-wrapper';
|
||||
@@ -616,9 +615,12 @@ export function renderTables() {
|
||||
});
|
||||
}
|
||||
tableWrapper.appendChild(tableElement);
|
||||
container.appendChild(tableWrapper);
|
||||
fragment.appendChild(tableWrapper);
|
||||
});
|
||||
|
||||
container.innerHTML = '';
|
||||
container.appendChild(fragment);
|
||||
|
||||
if (placeholder) {
|
||||
container.appendChild(placeholder);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user