Using Datatable functionality in vue.js component
Using Datatable functionality in vue.js component
Umair Chauhan
Posts: 1Questions: 1Answers: 0
I am using laravel spark application. I want to use datatable draw function like this (
(#mytable).Datatable() ) in my vue.js component. But there is error that Datatable is not a function. i am using datatable through CDN.
Answers
If
(#mytable)
is supposed to to be jQuery selector, then it should be something likeand then use
draw()
,Colin
Also note the capital T in DataTable.
Also worth noting is that I tend to use
v-once
on thr table to make sure that Vue and DataTables don't try to control the same DOM elements.Allan