Skip to content

Commit 6cb527c

Browse files
committed
fix(components/Root): Do not return an element in Root's init
1 parent aa3288b commit 6cb527c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/components/root/Root.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { required } from '../../validators'
2929
*/
3030
const RootComponent = Component({
3131
'validators': [required('title')],
32-
'init': (args, selection) => selection.select('title').text(args.title),
32+
'init': (args, selection) => {selection.select('title').text(args.title)},
3333
'render': (args, selection, data) => {
3434
const body = selection.select('body')
3535
body.selectAll('*').remove()

src/manual_test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,7 @@ dashboard "Cereals":
1818
- 4 columns:
1919
- attr:query: '.[] | {"component": "rows", "data": [{"component": "text", "args": {"tagName": "h3"}, "data": .name}, {"component": "chart", "args": {"type": "pie"}, "data": {"columns": [["protein", .protein], ["carbo", .carbo], ["sugars", .sugars], ["fat", .fat]]}}]}'
2020
- data: https://gist.githubusercontent.com/ZeningQu/6184eaf8faa533e320abc938c4738c3e/raw/40f237de825061faa8721c2293b79c46979780b4/cereals.csv
21+
- dropdown my_var=foo:
22+
- {"value": "foo", "text": "Foo"}
23+
- {"value": "bar", "text": "Bar"}
2124
`)

0 commit comments

Comments
 (0)