Skip to content

Commit

Permalink
relation with tags as source controlled
Browse files Browse the repository at this point in the history
  • Loading branch information
RafaelGB committed Jan 28, 2023
1 parent fb1052d commit 6d9974d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/cellTypes/RelationCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const RelationCell = (mdProps: CellComponentProps) => {
getAlignmentClassname(
tableColumn.config,
configInfo.getLocalSettings(),
["tabIndex"]
["tabIndex", "tags-container"]
)
)}
tabIndex={0}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class DataviewUpdaterHandlerAction extends AbstractTableAction<Da
break;
}
case DATAVIEW_UPDATER_OPERATIONS.UPDATE: {
if (updaterData.isActive) {
if (updaterData.isActive && isFileInDDBB) {
LOGGER.info(`Refreshing File "${updaterData.file}" is ignored due to active file update.`);
return updater;
}
Expand Down Expand Up @@ -83,11 +83,17 @@ export default class DataviewUpdaterHandlerAction extends AbstractTableAction<Da
}

private checkIfFileIsInSource(file: TFile, view: DatabaseView): boolean {
const cachedFile = app.metadataCache.getFileCache(file);
switch (view.diskConfig.yaml.config.source_data) {
case SourceDataTypes.CURRENT_FOLDER:
return file.parent.path.startsWith(view.file.parent.path);
case SourceDataTypes.CURRENT_FOLDER_WITHOUT_SUBFOLDERS:
return file.parent.path === view.file.parent.path;
case SourceDataTypes.TAG:
return cachedFile.tags
?.some((tagCache) =>
tagCache.tag === view.diskConfig.yaml.config.source_form_result
);
}
return true;
}
Expand Down

0 comments on commit 6d9974d

Please sign in to comment.