MCPcopy Create free account
hub / github.com/error311/FileRise / appendChunk

Function appendChunk

public/js/adminFolderAccess.js:676–685  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

674 loadMoreBtn.addEventListener('click', () => appendChunk());
675
676 function appendChunk() {
677 const slice = currentFiltered.slice(renderIndex, renderIndex + PAGE_SIZE);
678 if (!slice.length) return;
679 const html = slice.map((folder, idx) => rowHtml(folder, renderIndex + idx)).join("");
680 list.insertAdjacentHTML('beforeend', html);
681 list.querySelectorAll('.folder-access-row').forEach(wireRow);
682 renderIndex += slice.length;
683 updateLoadMoreVisibility();
684 refreshInheritance();
685 }
686
687 function updateLoadMoreVisibility() {
688 const remaining = currentFiltered.length - renderIndex;

Callers 2

renderFolderGrantsUIFunction · 0.85
renderFunction · 0.85

Calls 3

rowHtmlFunction · 0.85
updateLoadMoreVisibilityFunction · 0.85
refreshInheritanceFunction · 0.85

Tested by

no test coverage detected