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

Function restoreSelectedFileValues

public/js/fileListView.js:7283–7294  ·  view source on GitHub ↗
(listEl, selectedValues)

Source from the content-addressed store, hash-verified

7281}
7282
7283function restoreSelectedFileValues(listEl, selectedValues) {
7284 if (!listEl || !Array.isArray(selectedValues) || !selectedValues.length) return;
7285 const selectedSet = new Set(selectedValues.map(v => String(v)));
7286 listEl.querySelectorAll('tbody .file-checkbox').forEach(cb => {
7287 const raw = cb.value;
7288 const decoded = decodeHtmlEntities(raw);
7289 if (selectedSet.has(raw) || (decoded && selectedSet.has(decoded))) {
7290 cb.checked = true;
7291 updateRowHighlight(cb);
7292 }
7293 });
7294}
7295
7296export async function renderFileTable(folder, container, subfolders, options = {}) {
7297 clearInlineRenameState({ restore: false });

Callers 1

renderFileTableFunction · 0.85

Calls 2

decodeHtmlEntitiesFunction · 0.85
updateRowHighlightFunction · 0.85

Tested by

no test coverage detected