MCPcopy Create free account
hub / github.com/experdot/pointer / getItemsAtLevel

Function getItemsAtLevel

src/renderer/src/components/common/TreeView.tsx:637–642  ·  view source on GitHub ↗
(parentFolderId?: string, excludeId?: string)

Source from the content-addressed store, hash-verified

635 // ==================== 拖拽处理 ====================
636
637 const getItemsAtLevel = (parentFolderId?: string, excludeId?: string): (TItem | TFolder)[] => {
638 return [
639 ...items.filter((p) => p.parentFolderId === parentFolderId && p.id !== excludeId),
640 ...folders.filter((f) => f.parentFolderId === parentFolderId && f.id !== excludeId)
641 ].sort((a, b) => (a.order ?? 0) - (b.order ?? 0))
642 }
643
644 const handleDrop: TreeProps['onDrop'] = (info) => {
645 const dragKey = info.dragNode.key as string

Callers 1

handleDropFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected