question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dv.el not rendering in table row

See original GitHub issue

What happened?

up to 0.4.26 (at least) it was possible to render dv.el in a table row :

dv.table(
    ["name", "html"], 
    dv.pages("#someTag")
    .map(p => [p.file.link, dv.el('div', "ABC")])
)

was render something like

name html
A ABC
B ABC

now that i’ve upgraded to 0.5.34 the same code renders something like

ABC ABC

name html
A <HTMLDivElement>
B <HTMLDivElement>

DQL

dv.table(
    ["name", "html"], 
    dv.pages("#someTag")
    .map(p => [p.file.link, dv.el('div', "ABC")])
)

JS

No response

Dataview Version

0.5.34

Obsidian Version

0.14.15

OS

MacOS

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
blacksmithgucommented, Jun 17, 2022

Fixed in 0.5.35.

1reaction
chhoumanncommented, Jun 14, 2022

While nowhere near ideal, this seems to resolve the issue for me:

dv.span(containerEl.innerHTML);

where containerEl is your HTML element.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue js simple component for table not working - Stack Overflow
In your case, it caused your table to be rendered 'above' the header. Actually, browser has created two tables in this case: one...
Read more >
Table | Components - BootstrapVue
Avoid manipulating record data in place, as changes to the underlying items data will cause either the row or entire table to be...
Read more >
<table>: The Table element - HTML - MDN Web Docs - Mozilla
This attribute defines the space between the content of a cell and its border, displayed or not. If the cellpadding's length is defined...
Read more >
columns.render - DataTables
columns.render. Since: DataTables 1.10. Render (process) the data for use in the table. ... The full data source for the row (not based...
Read more >
DataviewJS Snippet Showcase - Obsidian Forum
IMG_20220107_230609.jpg|200]]") dv.el("div", dv. ... issue with the Obsidian Plugin API not rendering embeddings… could this be the issue?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found