Commit 026ea92f authored by Johnny's avatar Johnny

fix(editor): show newly linked memos when editing a memo with attachments

parent 252b3eff
...@@ -39,7 +39,7 @@ const RelationItemCard: FC<{ ...@@ -39,7 +39,7 @@ const RelationItemCard: FC<{
}; };
const RelationList: FC<RelationListProps> = ({ relations, onRelationsChange, parentPage, memoName }) => { const RelationList: FC<RelationListProps> = ({ relations, onRelationsChange, parentPage, memoName }) => {
const referenceRelations = relations.filter((r) => r.type === MemoRelation_Type.REFERENCE && (!memoName || r.memo?.name === memoName)); const referenceRelations = relations.filter((r) => r.type === MemoRelation_Type.REFERENCE && (!memoName || !r.memo?.name || r.memo.name === memoName));
const [fetchedMemos, setFetchedMemos] = useState<Record<string, MemoRelation_Memo>>({}); const [fetchedMemos, setFetchedMemos] = useState<Record<string, MemoRelation_Memo>>({});
useEffect(() => { useEffect(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment