()
| 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; |
no test coverage detected