How to create a collapsible list with dataviewjs

I’m using dataviewjs to collect some contents from my diary files, and then it will generate an iutput string like this:
var output = "- A\n\t- A1\n\t- A2\n\t- A3\n- B"
I can use dv.paragraph(output) to create the list below, however, the list is not collapsible.
How can I make the list collapsible or create a collapsible list in other way?

i have not tried what you want but tips i can offer:

  • try 2 spaces instead of tab character or check obsidian settings for default tabulator behavior
  • use callouts for dv query and those you can collapse but not by list parent items