Skip to content

Commit

Permalink
fix #115
Browse files Browse the repository at this point in the history
  • Loading branch information
mProjectsCode committed Sep 24, 2023
1 parent d3ad59d commit bbfbd93
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 51 deletions.
2 changes: 1 addition & 1 deletion exampleVault/Input Fields/Inline Select.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
select: a
select2: "2"
select2: 2
---

```meta-bind
Expand Down
52 changes: 3 additions & 49 deletions exampleVault/Test.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,8 @@ toggle: false
needs: Meta Bind JS
date: Saturday, July 8th 2023
text: asdasddas
Bible Reading: false
---


`--INPUT[suggester(option([[low]]), option([[medium]]), option([[high]])):frequency]`

```_dataviewjs
const setFilter = "" ;
let filter = "Need | "
const pages = await dv.pages()
let list = []
for (let items of pages) {
list.push('option(' + items.file.name + ')')
}
// This is the Mermaid configuration.
const codeblock = "INPUT[suggester(";
const backticks = "`";
console.log(`${filter}${backticks}${codeblock}${list}):needs]${backticks}`);
await dv.paragraph(`${filter}${backticks}${codeblock}${list}):needs]${backticks}`);
```

```_dataviewjs
const setFilter = "" ;
let filter = "Need | "
const pages = await dv.pages()
let list = []
for (let items of pages) {
list.push('option(' + items.file.name + ')')
}
// This is the Mermaid configuration.
const codeblock = "INPUT[text:text]";
const backticks = "`";
console.log(`${filter}${backticks}${codeblock}${backticks}`);
await dv.paragraph(`${filter}${backticks}${codeblock}${backticks}`);
```


```meta-bind-parser-test
declarationValidationGraph
```

```meta-bind-parser-test
argumentsValidationGraph
```
`INPUT[toggle:Bible Reading]`
`INPUT[toggle:["Bible Reading"]]`
2 changes: 1 addition & 1 deletion src/inputFields/fields/InlineSelectInputField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class InlineSelectInputField extends AbstractInputField<T> {
component.addOption(stringifyLiteral(option.value), option.name);
}
component.setValue(stringifyLiteral(this.getInitialValue()));
component.onChange(this.onValueChange);
component.onChange(value => this.onValueChange(parseLiteral(value)));
this.selectComponent = component;
}

Expand Down

0 comments on commit bbfbd93

Please sign in to comment.