passive-yellow
passive-yellow•2y ago

DataGrid and SSR

Hello, I'm trying to use SSR in my project, I'm using next with MUI, I've already configured everything, following the documentation, and I can already visualize the data as I need using console.log, however, when I pass the data as 'initialData' in the DataGrid, nothing happens, if I disable all javascript the table disappears, however, using Antd I did the same thing and it works normally, what can I do? i create the example in "users" page https://codesandbox.io/p/sandbox/refine-next-forked-67jvtz?welcome=true if you can't see, open in a new tab, thats works for me
refine-next (forked)
CodeSandbox is an online editor tailored for web applications.
8 Replies
refine-support-bot
refine-support-bot•2y ago
Hey, I am refine support bot :wave:. I am here to help you with your question. I searched for the answer to your question in the refine documentation and could not find an answer. Please wait for someone from the refine core team or the community to try to help you. 👊
exotic-emerald
exotic-emerald•2y ago
Hello @_leonardomuniz can you provide an example to us to help you? It's hard to guess without seeing the code
passive-yellow
passive-yellow•2y ago
hi, sorry for my delay, i create the example in "users" page https://codesandbox.io/p/sandbox/refine-next-forked-67jvtz?welcome=true if you can't see, open in a new tab, thats works for me
refine-next (forked)
CodeSandbox is an online editor tailored for web applications.
foreign-sapphire
foreign-sapphire•2y ago
Hi @_leonardomuniz table seems working as expected. what is the issue ?
No description
passive-yellow
passive-yellow•2y ago
hi @alicanerdurmaz yeah, but, but if I deactivate javascript and refresh the page, the data disappears, but it should still be visible, right? With Antd it works, but not with MUI.
foreign-sapphire
foreign-sapphire•2y ago
is it working on production build ?
passive-yellow
passive-yellow•2y ago
nop @alicanerdurmaz, I tried to build the project, but it's still the same
foreign-sapphire
foreign-sapphire•2y ago
Sorry for your trouble. We will investigate @_leonardomuniz Hi again, I created nextjs-mui project without refine and by default mui not work on SSR. Unfortunately I don't know why. I believe you can get a quicker answer if you ask on MUI forums Also, i found this doc but i didn't try https://mui.com/material-ui/guides/server-rendering/