Fix/upload document limit (#1033)
This commit is contained in:
@@ -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) => {
|
||||
|
Reference in New Issue
Block a user