Fix/upload document limit (#1033)
This commit is contained in:
parent
934def5fcc
commit
a7415ecfd8
8 changed files with 57 additions and 12 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue