There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix: page references in list/database (#3702)
Peng Xiao1eaf228a3097
diff --git a/packages/hooks/src/use-block-suite-page-references.ts b/packages/hooks/src/use-block-suite-page-references.tsindex 8a46cde154..60c7d84028 100644--- a/packages/hooks/src/use-block-suite-page-references.ts+++ b/packages/hooks/src/use-block-suite-page-references.ts@@ -7,8 +7,8 @@ import { useBlockSuiteWorkspacePage } from './use-block-suite-workspace-page';const weakMap = new WeakMap<Page, Atom<string[]>>();function getPageReferences(page: Page): string[] {// todo: is there a way to use page indexer to get all references?- return page- .getBlockByFlavour('affine:paragraph')+ return ['affine:paragraph', 'affine:list', 'affine:database']+ .flatMap(f => page.getBlockByFlavour(f)).flatMap(b => b.text?.toDelta()).map(v => v?.attributes?.reference?.pageId).filter(Boolean);