alexcode / vue2vis

A Vuejs 2 adapter for Visjs
MIT License
217 stars 59 forks source link

items are added but not visible on timeline #57

Open bachy opened 4 years ago

bachy commented 4 years ago

Hi, i can't get timeline to display items i can found them in the timeline object with console but there are not displayed at all i'm searching for this for hours, but i cant get it work here is my code https://esadhar.net/gogs/bachir/offline-timeline/src/vue2vis/src/App.vue thanks

bachy commented 4 years ago

same code is working perfectly without vue2vis https://esadhar.net/gogs/bachir/offline-timeline/src/master/src/App.vue

polosson commented 4 years ago

Hi!
I'm facing the same problem here, after having updated to version 0.0.18. Here is a screenshot of the Vue devTools on the component, showing that items are in component' state, but nothing is displayed on timeline (no element in resulting DOM):

Screenshot_20200331_125840

But I can't figure out why this is happening... Any thought?
Thanks!

alexcode commented 4 years ago

I'd be happy to help out but I'd need to repro the issue. Here is a working fiddle, just repro your problem from that.

polosson commented 4 years ago

Hi @alexcode!

I've just edited the fiddle: https://jsfiddle.net/2gp9dokz/2/

It seems that the bug occurs when we differ the fetch of items. If you un-comment the settimeout on lines 15 and 17, the items are not rendered. In my case, the delay is due to a real distant API fetching, using Axios.

Thanks for your time!

jansim commented 4 years ago

I'm having the same issue as @polosson, but until there is a fix I was able to work around it by delaying the initialization of the Timeline until my data is fetched via v-if.