Skip to content

Commit bbfbd93

Browse files
committed
fix #115
1 parent d3ad59d commit bbfbd93

File tree

3 files changed

+5
-51
lines changed

3 files changed

+5
-51
lines changed

exampleVault/Input Fields/Inline Select.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
select: a
3-
select2: "2"
3+
select2: 2
44
---
55

66
```meta-bind

exampleVault/Test.md

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,8 @@ toggle: false
44
needs: Meta Bind JS
55
date: Saturday, July 8th 2023
66
text: asdasddas
7+
Bible Reading: false
78
---
89

9-
10-
`--INPUT[suggester(option([[low]]), option([[medium]]), option([[high]])):frequency]`
11-
12-
```_dataviewjs
13-
const setFilter = "" ;
14-
let filter = "Need | "
15-
const pages = await dv.pages()
16-
let list = []
17-
18-
for (let items of pages) {
19-
list.push('option(' + items.file.name + ')')
20-
}
21-
22-
// This is the Mermaid configuration.
23-
const codeblock = "INPUT[suggester(";
24-
const backticks = "`";
25-
26-
console.log(`${filter}${backticks}${codeblock}${list}):needs]${backticks}`);
27-
28-
await dv.paragraph(`${filter}${backticks}${codeblock}${list}):needs]${backticks}`);
29-
```
30-
31-
```_dataviewjs
32-
const setFilter = "" ;
33-
let filter = "Need | "
34-
const pages = await dv.pages()
35-
let list = []
36-
37-
for (let items of pages) {
38-
list.push('option(' + items.file.name + ')')
39-
}
40-
41-
// This is the Mermaid configuration.
42-
const codeblock = "INPUT[text:text]";
43-
const backticks = "`";
44-
45-
console.log(`${filter}${backticks}${codeblock}${backticks}`);
46-
47-
await dv.paragraph(`${filter}${backticks}${codeblock}${backticks}`);
48-
```
49-
50-
51-
```meta-bind-parser-test
52-
declarationValidationGraph
53-
```
54-
55-
```meta-bind-parser-test
56-
argumentsValidationGraph
57-
```
10+
`INPUT[toggle:Bible Reading]`
11+
`INPUT[toggle:["Bible Reading"]]`

src/inputFields/fields/InlineSelectInputField.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class InlineSelectInputField extends AbstractInputField<T> {
6363
component.addOption(stringifyLiteral(option.value), option.name);
6464
}
6565
component.setValue(stringifyLiteral(this.getInitialValue()));
66-
component.onChange(this.onValueChange);
66+
component.onChange(value => this.onValueChange(parseLiteral(value)));
6767
this.selectComponent = component;
6868
}
6969

0 commit comments

Comments
 (0)