obsidian-dataview icon indicating copy to clipboard operation
obsidian-dataview copied to clipboard

Checkbox in Dataview Table

Open Missionary-OSBS opened this issue 3 years ago • 8 comments

Is your feature request related to a problem? Please describe. No. I would like to have checkbox rendered in Dataview Table. It would make life easier.

Describe the solution you'd like Dataview Table should render key:: - [ ] as checkbox, or some kind of syntax Dataview could read to make a checkbox.

Describe alternatives you've considered There is no alternative.

Missionary-OSBS avatar Jun 14 '22 03:06 Missionary-OSBS

As far as I am aware, - [ ] does render a checkbox - the checkbox simply is not connected to anything. Is what you are asking for the ability to check the box in Dataview and have it be checked in the page?

blacksmithgu avatar Jun 14 '22 04:06 blacksmithgu

On my end, - [ ] does not render a checkbox. And yes, it would be wonderful if I could check the box in Dataview Table. Screenshot - 2022-06-14 11 16 45 (Obsidian) Screenshot - 2022-06-14 11 17 17 (Obsidian)

Missionary-OSBS avatar Jun 14 '22 18:06 Missionary-OSBS

Dataview can handle tasks but what you've defined there aren't tasks.

Example: - [ ] this is a task

AB1908 avatar Jun 14 '22 21:06 AB1908

Oh I see. Yeah I should have typed something there. Thank you for pointing that out. But the checkbox does not remembered and refreshed unchecked. So I had to manually put an X inside the bracket.

It would be great if it remembers when I click on it...

Missionary-OSBS avatar Jun 14 '22 23:06 Missionary-OSBS

That behavior works for stuff defined like so:

# heading

- [ ] task 1
- [ ] task 2

Not sure how difficult it would be to get it to work on tasks that you've defined. Additionally, checkboxes inside tables won't really work. You have to use task queries instead.

AB1908 avatar Jun 15 '22 11:06 AB1908

Exactly, this is what this post is about: The Checkbox in Dataview Table not the normal task list. And the checkbox inside table does work but you have to do it manually.

  • In edit mode: I had to type an x inside the bracket Screenshot - 2022-06-15 13 24 54 (Obsidian)
  • In preview mode: it will display the checkbox was checked Screenshot - 2022-06-15 13 24 19 (Obsidian)

The request here is to interact with Checkbox in Dataview table in Preview mode. I'm happy to see that happen.

Missionary-OSBS avatar Jun 15 '22 20:06 Missionary-OSBS

But if any interaction becomes possible (tasks in tables), that isn't your case, because you don't have a task! You have:

Gold:: - [ ] Text

You got a render effect, never a task!

mnvwvnm avatar Jun 15 '22 21:06 mnvwvnm

I see. Thank you for pointing that out.

Missionary-OSBS avatar Jun 16 '22 21:06 Missionary-OSBS