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

Commit 5be6e9d

Browse files
committed
IMPROVED TAGS
1 parent 5ee425d commit 5be6e9d

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/helpers/Constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ export const DEFAULT_SETTINGS: DatabaseSettings = {
408408
show_metadata_inlinks: false,
409409
show_metadata_outlinks: false,
410410
source_data: SourceDataTypes.CURRENT_FOLDER,
411-
source_form_result: 'root',
411+
source_form_result: '',
412412
source_destination_path: '/',
413413
row_templates_folder: '/',
414414
current_row_template: '',

src/helpers/VaultManagement.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ export async function sourceDataviewPages(ddbbConfig: LocalSettings, folderPath:
127127
pagesResult = await obtainQueryResult(
128128
generateDataviewTableQuery(
129129
columns,
130-
ddbbConfig.source_form_result),
131-
folderPath
130+
ddbbConfig.source_form_result)
132131
);
133132
break;
134133
case SourceDataTypes.CURRENT_FOLDER_WITHOUT_SUBFOLDERS:
@@ -146,13 +145,13 @@ export async function sourceDataviewPages(ddbbConfig: LocalSettings, folderPath:
146145
} catch (error) {
147146
const msg = `Error obtaining pages result. Current folder loaded instead`;
148147
LOGGER.error(msg, error);
149-
new Notice(msg, 10000);
148+
new Notice(msg, 4000);
150149
pagesResult = DataviewService.getDataviewAPI().pages(`"${folderPath}"`);
151150
}
152151
return pagesResult;
153152
}
154153

155-
async function obtainQueryResult(query: string, folderPath: string): Promise<DataArray<Record<string, Literal>>> {
154+
async function obtainQueryResult(query: string): Promise<DataArray<Record<string, Literal>>> {
156155
const result = await DataviewService.getDataviewAPI().query(query);
157156
if (!result.successful || result.value.type !== 'table') {
158157
throw new Error(`Query ${query} failed`);

src/settings/handlers/source/flavours/TagsSourceBuilder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ export class TagSourceBuilder {
4646
});
4747

4848
cb.inputEl.style.width = "auto";
49-
}).addExtraButton((button) => {
50-
button.setIcon("cross")
49+
}).addButton((button) => {
50+
button.setButtonText("Reset")
5151
.setTooltip(t("settings_source_form_tag_clear_button_tooltip"))
5252
.onClick(async () => {
5353
// Clear all tags
5454
this.selectedTags = [];
55-
this.initSuggestions();
5655
suggester.setSuggestions(this.tagRecords);
5756
await this.view.diskConfig.updateConfig({
5857
source_form_result: ""
5958
});
59+
this.initSuggestions();
6060
this.tagsLabel.innerHTML = "None";
6161
this.tagsContainer.style.display = "none";
6262
});

0 commit comments

Comments
 (0)