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

Function renderListItems

renderer.js:16484–16502  ·  view source on GitHub ↗
(itemsToRender, listElement, searchTerm)

Source from the content-addressed store, hash-verified

16482 requestAnimationFrame(() => {
16483 const onDoc = (ev) => {
16484 if (!listViewColumnsPopoverEl || listViewColumnsPopoverEl.contains(ev.target) || anchorBtn.contains(ev.target)) {
16485 return;
16486 }
16487 closeListViewColumnsPopover();
16488 document.removeEventListener('mousedown', onDoc, true);
16489 };
16490 document.addEventListener('mousedown', onDoc, true);
16491 });
16492}
16493
16494function attachListViewColumnResizeHandle(wrapEl, colId) {
16495 const def = LIST_VIEW_COLUMN_DEFS.find(c => c.id === colId);
16496 if (!def || !wrapEl) return;
16497 const handle = document.createElement('div');
16498 handle.className = 'list-view-col-resize-handle';
16499 handle.title = 'Drag to resize';
16500 handle.addEventListener('mousedown', e => {
16501 e.preventDefault();
16502 e.stopPropagation();
16503 ensureListViewColumnState();
16504 const startX = e.clientX;
16505 const startW = listViewColumnState.widths[colId] ?? def.defaultWidth;

Callers 2

showSearchableListDialogFunction · 0.85
handleSearchFunction · 0.85

Calls 1

handleItemClickFunction · 0.85

Tested by

no test coverage detected