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

Commit dd0b9d6

Browse files
committed
dddbb can parse another ddbb
1 parent 223ae58 commit dd0b9d6

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/DatabaseView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export class DatabaseView extends TextFileView implements HoverParent {
167167
// Obtain base information about columns
168168
this.columns = await obtainColumnsFromFolder(yamlColumns);
169169
this.rows = await adapterTFilesToRows(
170-
this.file.parent.path,
170+
this.file,
171171
this.columns,
172172
this.diskConfig.yaml.config,
173173
this.diskConfig.yaml.filters

src/helpers/VaultManagement.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,13 @@ export function getNormalizedPath(path: string): NormalizedPath {
7373
* @param folderPath
7474
* @returns
7575
*/
76-
export async function adapterTFilesToRows(folderPath: string, columns: TableColumn[], ddbbConfig: LocalSettings, filters: FilterSettings): Promise<Array<RowDataType>> {
76+
export async function adapterTFilesToRows(dbFile: TFile, columns: TableColumn[], ddbbConfig: LocalSettings, filters: FilterSettings): Promise<Array<RowDataType>> {
77+
const folderPath = dbFile.parent.path;
7778
LOGGER.debug(`=> adapterTFilesToRows. folderPath:${folderPath}`);
7879
const rows: Array<RowDataType> = [];
7980

8081
let folderFiles = await sourceDataviewPages(folderPath, ddbbConfig, columns);
81-
folderFiles = folderFiles.where(p => !p[DatabaseCore.FRONTMATTER_KEY]);
82+
folderFiles = folderFiles.where(p => (p.file as any).path !== dbFile.path);
8283
// Config filters asociated with the database
8384
if (filters.enabled && filters.conditions.length > 0) {
8485
folderFiles = folderFiles.where(p => DataviewService.filter(filters.conditions, p, ddbbConfig));

src/services/DatabaseInfo.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export default class DatabaseInfo {
4949
}
5050

5151
this.yaml = response.yaml;
52-
//await this.saveOnDisk();
5352
LOGGER.info(`<=initDatabaseconfigYaml`);
5453
}
5554

src/services/MarkdownPostProcessorService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export class PreviewDatabaseModeService {
135135
// Obtain base information about columns
136136
const columns = await obtainColumnsFromFolder(yamlColumns);
137137
const rows = await adapterTFilesToRows(
138-
dbFile.parent.path,
138+
dbFile,
139139
columns,
140140
databaseDisk.yaml.config,
141141
databaseDisk.yaml.filters

src/stateManagement/data/handlers/DataviewRefreshHandlerAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default class DataviewRefreshHandlerAction extends AbstractTableAction<Da
99
const { set, view, implementation } = tableActionResponse;
1010
implementation.actions.dataviewRefresh = async (column: TableColumn[], ddbbConfig: LocalSettings, filterConfig: FilterSettings) => {
1111
const refreshedRows = await adapterTFilesToRows(
12-
view.file.parent.path,
12+
view.file,
1313
column,
1414
ddbbConfig,
1515
filterConfig

0 commit comments

Comments
 (0)