Skip to content

Commit

Permalink
fix: remove leading # in tags
Browse files Browse the repository at this point in the history
  • Loading branch information
danielo515 committed Nov 23, 2023
1 parent f20cb4f commit 556b769
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions src/FormModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,21 +165,21 @@ export class FormModal extends Modal {
source == "fixed"
? fieldInput.multi_select_options
: source == "notes"
? pipe(
get_tfiles_from_folder(
fieldInput.folder,
this.app,
),
E.map(A.map((file) => file.basename)),
E.getOrElse((err) => {
log_error(err);
return [] as string[];
}),
)
: executeSandboxedDvQuery(
sandboxedDvQuery(fieldInput.query),
this.app,
);
? pipe(
get_tfiles_from_folder(
fieldInput.folder,
this.app,
),
E.map(A.map((file) => file.basename)),
E.getOrElse((err) => {
log_error(err);
return [] as string[];
}),
)
: executeSandboxedDvQuery(
sandboxedDvQuery(fieldInput.query),
this.app,
);
this.svelteComponents.push(
new MultiSelect({
target: fieldBase.controlEl,
Expand All @@ -198,8 +198,9 @@ export class FormModal extends Modal {
case "tag": {
const options = Object.keys(
this.app.metadataCache.getTags(),
);
this.formResult[definition.name] = this.formResult[definition.name] || [];
).map((tag) => tag.slice(1)); // remove the #
this.formResult[definition.name] =
this.formResult[definition.name] || [];
this.svelteComponents.push(
new MultiSelect({
target: fieldBase.controlEl,
Expand Down

0 comments on commit 556b769

Please sign in to comment.