(itemsToRender, listElement, searchTerm)
| 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 | |
| 16494 | function 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; |
no test coverage detected