olifolkerd / tabulator

Interactive Tables and Data Grids for JavaScript
http://tabulator.info
MIT License
6.59k stars 812 forks source link

How to use with VueJS 3 and Composition API #3469

Closed djcaesar9114 closed 2 years ago

djcaesar9114 commented 2 years ago

Website Page A link to the page with the issue

Describe the issue

First of all thanks for your work, the results are impressive!

Well, the issue is that I don't know how to use Tabulator, which seems a very good tool, in my VueJS3 app. I suppose I have to import the library in my main.js:

import Tabulator from 'tabulator';

Then in the same main.js I have to use tabulator:

app.use(tabulator).mount('#app');

And in any component (for example MyData.vue) I have to inject it:

  setup(props) {
    const tabulator = inject('$tabulator');

But of course What I wrote doesn't work. I haven't gone deep enough in Tabulator to understand how I could use it properly.

LilDevil commented 2 years ago

Have you seen this? http://tabulator.info/docs/5.0/frameworks#vue

djcaesar9114 commented 2 years ago

Yes, I did :) This is clearly not working with VueJS3 composition API, or I misinterpret how it should work.

olifolkerd commented 2 years ago

This is a duplicate of #3194

olifolkerd commented 2 years ago

Hey @djcaesar9114

Can you provide a link to the console errors you are seeing?

Cheers

Oli :)

djcaesar9114 commented 2 years ago

Actually it comes from the fact that vue-tabulator doesn't support Vue3: https://github.com/angeliski/vue-tabulator/issues/109 Also, it doesn't work with Tabulator 5: https://github.com/angeliski/vue-tabulator/issues/116

It's a shame because tabulator seems great. I'll have to look for another solution :(