Skip to content

Commit

Permalink
fix(components/Root): Do not return an element in Root's init
Browse files Browse the repository at this point in the history
  • Loading branch information
kantord committed Mar 9, 2018
1 parent aa3288b commit 6cb527c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/root/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { required } from '../../validators'
*/
const RootComponent = Component({
'validators': [required('title')],
'init': (args, selection) => selection.select('title').text(args.title),
'init': (args, selection) => {selection.select('title').text(args.title)},
'render': (args, selection, data) => {
const body = selection.select('body')
body.selectAll('*').remove()
Expand Down
3 changes: 3 additions & 0 deletions src/manual_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@ dashboard "Cereals":
- 4 columns:
- 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]]}}]}'
- data: https://gist.githubusercontent.com/ZeningQu/6184eaf8faa533e320abc938c4738c3e/raw/40f237de825061faa8721c2293b79c46979780b4/cereals.csv
- dropdown my_var=foo:
- {"value": "foo", "text": "Foo"}
- {"value": "bar", "text": "Bar"}
`)

0 comments on commit 6cb527c

Please sign in to comment.