feat: refactor trash, page would delete from its parent's subpageIds after move to trash (#1871)
This commit is contained in:
12 files changed
+119
-82
No files matched your search
@@ -2,7 +2,7 @@ import { MenuItem } from '@affine/component';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { ArrowRightSmallIcon, MoveToIcon } from '@blocksuite/icons';
|
||||
import type { PageMeta } from '@blocksuite/store';
|
||||
import { useMemo, useRef, useState } from 'react';
|
||||
import { useRef, useState } from 'react';
|
||||
|
||||
import type { BlockSuiteWorkspace } from '../../../shared';
|
||||
import { PinboardMenu } from '../pinboard';
|
||||
@@ -47,10 +47,7 @@ export const MoveTo = ({
|
||||
anchorEl={anchorEl}
|
||||
open={open}
|
||||
placement="left-start"
|
||||
metas={useMemo(
|
||||
() => metas.filter(m => !m.trash && m.id !== currentMeta.id),
|
||||
[metas, currentMeta]
|
||||
)}
|
||||
metas={metas}
|
||||
currentMeta={currentMeta}
|
||||
blockSuiteWorkspace={blockSuiteWorkspace}
|
||||
onPinboardClick={onSelect}
|
||||
|
||||
Reference in new issue
Block a user