MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / renderFilteredFiles

Function renderFilteredFiles

renderer.js:15593–15610  ·  view source on GitHub ↗
(files)

Source from the content-addressed store, hash-verified

15591 }
15592}
15593
15594/** Set tag filter dropdown and refresh the grid (same path as Filter menu; works with getModelsFiltered in Electron and server bridge). */
15595async function applyTagFilterFromModelClick(tagName) {
15596 const trimmed = (tagName && String(tagName).trim()) || '';
15597 if (!trimmed) return;
15598 if (window.dateAddedFilter) {
15599 window.dateAddedFilter = null;
15600 window._lastDateAddedFilter = null;
15601 }
15602 window.viewingEntireLibrary = false;
15603 if (typeof window.resetFilterSelectionAndDetails === 'function') {
15604 window.resetFilterSelectionAndDetails();
15605 }
15606 const tagSelect = document.getElementById('tag-filter');
15607 if (!tagSelect) return;
15608 const hasOption = Array.from(tagSelect.options).some((o) => o.value === trimmed);
15609 if (!hasOption) {
15610 const opt = document.createElement('option');
15611 opt.value = trimmed;
15612 opt.textContent = trimmed;
15613 tagSelect.appendChild(opt);

Callers

nothing calls this directly

Calls 2

renderFileFunction · 0.85
updateModelCountsFunction · 0.85

Tested by

no test coverage detected