HTML for field in columns[..] of QTable



  • I am playing with QTable and columns[…] and want to format field with html tag. However I fail here

      columns: [
        { name: 'name',  label: 'Name', align: 'center', sortable: true,
        field: row => (`${row.name} <b>abcd </b>`),  
        format: val => `<b> ${val} </b>`
        },
    

    ]

    I try to embed html code in field and format attribute. However in browser html code is not run, still print out <b> tag

    So could we do this in columns[…] (I know q-td could do it)

    Tks for any help



  • The reason I am asking because of the conflicting in using selection="multiple" :selected.sync="selected"

    If we use above attribute, QTree will generate checkbox in first column. However if we use q-td, checbox column in tbody will disappear. This create a conflict when we have header with checkbox but not row.
    `


Log in to reply