Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit 8c81b59

Browse files
committed
Merge branch '573-bug-relations-columns-showing-content-of-own-db-instead-of-linked-db'
2 parents d0fcc0a + 1695893 commit 8c81b59

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/components/cellTypes/Editor/RelationEditor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { recordRowsFromRelation } from "helpers/RelationHelper";
88
import { TableColumn } from "cdm/FolderModel";
99
import { Link } from "obsidian-dataview";
1010
import { OnChangeValue } from "react-select";
11-
import { StyleVariables } from "helpers/Constants";
11+
import { DEFAULT_SETTINGS, StyleVariables } from "helpers/Constants";
1212

1313
const RelationEditor = (props: RelationEditorComponentProps) => {
1414
const { defaultCell, persistChange, relationCell } = props;
@@ -49,7 +49,7 @@ const RelationEditor = (props: RelationEditorComponentProps) => {
4949
const relationRowsCallBack = useCallback(async () => {
5050
const relationRows = await recordRowsFromRelation(
5151
tableColumn.config.related_note_path,
52-
configInfo.getLocalSettings(),
52+
DEFAULT_SETTINGS.local_settings,
5353
columnsInfo.getAllColumns()
5454
);
5555
const multiOptions = Object.entries(relationRows).map(([key, value]) => ({

src/helpers/RelationHelper.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ export async function recordRowsFromRelation(ddbbPath: string, ddbbConfig: Local
3030
const relationRows: Record<string, string> = {};
3131
const ddbbFile = resolve_tfile(ddbbPath);
3232
const ddbbInfo = new DatabaseInfo(ddbbFile);
33-
ddbbInfo.initDatabaseconfigYaml(ddbbConfig);
34-
const ddbbRows = await sourceDataviewPages(ddbbConfig, ddbbFile.parent.path, columns);
33+
await ddbbInfo.initDatabaseconfigYaml(ddbbConfig);
34+
35+
const ddbbRows = await sourceDataviewPages(ddbbInfo.yaml.config, ddbbFile.parent.path, columns);
3536
ddbbRows
3637
.filter((page) => page[DatabaseCore.FRONTMATTER_KEY] === undefined)
3738
.forEach((page) => {

0 commit comments

Comments
 (0)