-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSR nuxt #13
Comments
Hello, Do you mind sending full debug log from your console and the part of the code where you use the grid, thanks 😄 |
Hi,
within plugins:
then within any nuxt page
I'm aware i should pass the renderdata as an object but passing an empty object should work for a starter ;-) thanks! And may i ask, will it be possible to add slot content in the future, it would be a lot easier if i could use the item component just within the virtual grid component |
First of all, it should be an array of object, so passing But from the error you get, it seems unrelated...
Not sure what you are asking, can you rephrase? |
So after some searches. This plugin do not support SSR as of now. You can use it with:
There is maybe an answer here: https://stackoverflow.com/questions/61409902/vue-how-to-build-bundle-for-nuxt-with-vue-cli-service Let me know if that helps. |
@merijnponzo Were you able to get this working with nuxt? If so, would really appreciate if you could let us know the solution. |
Alright, got it figured out. I still imported the component in the page I was using it, which doesn't work when it is already imported with Vue.use(VirtualGrid) in the /plugins directory. Here's the complete solution for nuxt: plugin file virtualgrid.js (in /plugins)
Where you want to use the component.
Just use <VirtualGrid ... > on your page. |
Hi, i switched to vue-virtual-scroll-list due the lack of time for a deadline :-) And i prefer using slots. Best! |
Thanks man for the reply. Mh, I would need Grid Layout support - I guess vue-virtual-scroll-list doesn't support that, or does it? Yeah, slots are pretty sweet. :) |
Seems like I spoke too soon. Even though I don't get a fatal nuxt error now, I get this in the debug console:
|
Alright, got rid of the "not registered" error. Apparently, one has to use Vue.component to register pure components, while Vue.use registers plugins that themselves internally register components. Updated virtualgrid.js (/plugins folder)
|
I'm not sure I follow you @MentalGear , did you manage to make it work with SSR? |
Hi does this work with nuxt / ssr?
I've got
Not sure if I implemented the virtual grid in the right way
The text was updated successfully, but these errors were encountered: