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

Function handleBatchDelete

src/renderer/src/components/panels/Explorer.tsx:123–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121 }
122
123 const handleBatchDelete = (): void => {
124 if (checkedKeys.length === 0) return
125 showDeleteConfirm({
126 title: `删除 ${checkedKeys.length} 个项目`,
127 onOk: async () => {
128 const pageIds = checkedKeys.filter((key) => pages.some((p) => p.id === key))
129 const folderIds = checkedKeys.filter((key) => folders.some((f) => f.id === key))
130 await deletePages(pageIds)
131 await deleteFolders(folderIds)
132 setCheckedKeys([])
133 setMultiSelect(false)
134 }
135 })
136 }
137
138 const getAllKeys = (): string[] => {
139 return [...pages.map((p) => p.id), ...folders.map((f) => f.id)]

Callers

nothing calls this directly

Calls 3

showDeleteConfirmFunction · 0.85
deletePagesFunction · 0.85
deleteFoldersFunction · 0.85

Tested by

no test coverage detected