Skip to content

how can I make table cells rendered with dv.table() appear in their own rows? #2075

Closed Answered by Oneechan69
Oneechan69 asked this question in Q&A
Discussion options

You must be logged in to vote

I solved it using a solution to another post here, I wrote this JS:

const { fieldModifier: f } = this.app.plugins.plugins["metadata-menu"].api;
dv.container.className = dv.container.className.includes('TaskTable') ? dv.container.className : `${dv.container.className} TaskTable`
const { query, filter } = input

const format = (dv, d, field) => {
    function appendElement(newClass) { 
    let oldClass = element.getAttribute("class")
    newClass = `${oldClass?oldClass:""} ${newClass}`
    element.setAttribute("class", newClass)
    }; let element = f(dv, d, field);
    if (field.includes("Date ") && !isNaN(Date.parse(element.textContent)))
        element.textContent = moment(element.textC…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Oneechan69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant