Topic: Datatables Example

kFrank free asked 5 years ago


I wanted to try the simple example of Datatables. So I copied the code for Basic example on the site (https://mdbootstrap.com/docs/vue/tables/datatables/) and added it as component in my code.

The application runs without any error but there is nothing loaded on the screen.
Did I have to change anything in the example code that it will work?


Jakub Strebeyko staff answered 5 years ago


Hi @kFrank ,

Right on! :D That's the most important part. So are you saying you altered the snippet from the docs? We are more than welcome for the tips to improve them!

Best,
Kuba


kFrank free commented 5 years ago

Yes I alterd the snippet from the docs.
But now I can't re-establish my error. The original code from docs is now working.


Jakub Strebeyko staff commented 5 years ago

All right, if it is working then it is all cool & dandy. Let's keep a keen eye on these shifty snippet errors! :)

Cheers, Kuba


kFrank free answered 5 years ago


I don't really know why it's working now but it works!
I changed the ES6 syntax from data() to ES5 and now it works. After this I returned changes and it's still working.


With Best Regards,

kFrank


Jakub Strebeyko staff answered 5 years ago


Hi @kFrank,

No additional steps should be necessary, the code taken "as is" works when pasted on my end. Does your component get compiled into markup, i.e. there is a HTML element with "dataTable" class in Chrome devTools? Does the Vue.js devtools extension recognize the component? There should be at least something, or it gets lost somewhere on the way.

With Best Regards,
Kuba



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 4.8.2
  • Device: Notebook
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No