Skip to content

Commit

Permalink
#2204: Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
blacksmithgu committed Mar 20, 2024
1 parent d1883e6 commit 692198b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/docs/api/code-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,9 @@ dv.list(dv.pages("#book").where(p => p.rating > 7)) => list of all books with ra

### `dv.taskList(tasks, groupByFile)`

Render a dataview list of `Task` objects, as obtained by `page.file.tasks`. Only the first argument is required; if the
second argument `groupByFile` is provided (and is true), then tasks will be grouped by the file they come from automatically.
Render a dataview list of `Task` objects, as obtained by `page.file.tasks`. By default, this view will automatically
group the tasks by their origin file. If you provide `false` as a second argument explicitly, it will instead render them
as a single unified list.

```js
// List all tasks from pages marked '#project'
Expand All @@ -204,6 +205,9 @@ dv.taskList(dv.pages("#project").file.tasks
// List all tasks tagged with '#tag' from pages marked #project
dv.taskList(dv.pages("#project").file.tasks
.where(t => t.text.includes("#tag")))

// List all tasks from pages marked '#project', without grouping.
dv.taskList(dv.pages("#project").file.tasks, false)
```

### `dv.table(headers, elements)`
Expand Down

0 comments on commit 692198b

Please sign in to comment.