Fix/upload document limit (#1033)

This commit is contained in:
zxhlyh 2023-08-28 10:53:45 +08:00 • committed by GitHub
commit a7415ecfd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 57 additions and 12 deletions

View file

@ -228,29 +228,30 @@ const PageSelector = ({
setDataList(newDataList)
}
const copyValue = new Set([...value])
const handleCheck = (index: number) => {
const current = currentDataList[index]
const pageId = current.page_id
const currentWithChildrenAndDescendants = listMapWithChildrenAndDescendants[pageId]
if (value.has(pageId)) {
if (copyValue.has(pageId)) {
if (!searchValue) {
for (const item of currentWithChildrenAndDescendants.descendants)
value.delete(item)
copyValue.delete(item)
}
value.delete(pageId)
copyValue.delete(pageId)
}
else {
if (!searchValue) {
for (const item of currentWithChildrenAndDescendants.descendants)
value.add(item)
copyValue.add(item)
}
value.add(pageId)
copyValue.add(pageId)
}
onSelect(new Set([...value]))
onSelect(new Set([...copyValue]))
}
const handlePreview = (index: number) => {