using Vue3 with ES Module imports
using Vue3 with ES Module imports
serisu627
Posts: 3Questions: 1Answers: 0
Hello
I encountered an issue while using Vue 3 with ES Module imports. I have searched through historical posts, but the problem still seems unresolved.
The issues I am facing are as follows:
The slot does not work and displays [object HTMLDivElement] in the ROW.
When the column's data is set to an empty string (''), an error occurs. If null is used, it displays [object Object].
I have prepared an online test example. Could you please take a look at it for me?
https://jsfiddle.net/kjv35c7w/1/
Thank
This question has an accepted answers - jump to answer
Answers
You are loading in DataTables 1.x which does not accept an HTML element from the rendering function, which is required for the Vue slot to work. You need to load DataTables 2, of which 2.1.8 is currently the latest.
Doing that allows it to work as expected: https://jsfiddle.net/7ovwt8h3/ .
Note that column index 3 is still showing
[object Object]
because it hasdata: null
and no template set. The first column that has the template however, is displaying correctly.Allan
Itβs working properly now!!
I truly appreciate it. Thank you so much!