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