Using Datatable functionality in vue.js component

Using Datatable functionality in vue.js component

Umair ChauhanUmair Chauhan Posts: 1Questions: 1Answers: 0
edited June 2 in DataTables

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.


  • colincolin Posts: 12,939Questions: 0Answers: 2,204

    If (#mytable) is supposed to to be jQuery selector, then it should be something like


    and then use draw(),


  • allanallan Posts: 54,909Questions: 1Answers: 8,606 Site admin

    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.


Sign In or Register to comment.