mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-28 04:53:53 +03:00
fix: show recursive items (#3750)
This commit is contained in:
parent
8487b2c4af
commit
2830cb19fe
@ -29,14 +29,8 @@ export const ReferencePage = ({
|
||||
const icon = setting?.mode === 'edgeless' ? <EdgelessIcon /> : <PageIcon />;
|
||||
const references = useBlockSuitePageReferences(workspace, pageId);
|
||||
const referencesToShow = useMemo(() => {
|
||||
return [
|
||||
...new Set(
|
||||
references.filter(
|
||||
ref => !parentIds.has(ref) && !metaMapping[ref]?.trash
|
||||
)
|
||||
),
|
||||
];
|
||||
}, [references, parentIds, metaMapping]);
|
||||
return [...new Set(references.filter(ref => !metaMapping[ref]?.trash))];
|
||||
}, [references, metaMapping]);
|
||||
const [collapsed, setCollapsed] = useState(true);
|
||||
const collapsible = referencesToShow.length > 0;
|
||||
const nestedItem = parentIds.size > 0;
|
||||
|
Loading…
Reference in New Issue
Block a user