2

I am using the gridjs-vue wrapper to use grid.js with Vue. I'd like to use the formatter feature of gridjs, but it requires the html function. How do I import the html function into my component? If I try to import it from gridjs-vue, it says that html is not found in gridjs-vue.

buckthorn
  • 1,727
  • 13
  • 15

1 Answers1

0

Use this.$gridjs.html(...). Example:

this.cols = [
  {
    name: 'Model',
    formatter: cell => this.$gridjs.html(`<b>${cell}</b>`)
  },
  { ... },
  { ... }
]

See https://github.com/grid-js/gridjs-vue#gridjshtml

Afshin Mehrabani
  • 33,262
  • 29
  • 136
  • 201