wise-white
wise-whiteβ€’2y ago

Tutorial - Generate CRUD Pages

Hi, I'm going through the tutorial and got upto the Generate CRUD page but it's not working as I would have expected on Chrome. The pages that are generated for products never actually show any data. List page only shows spinner which never stops spinning. The edit page opens and shows the right form structure just no data from the entry gets loaded into the form. From the network console it looks like the product entries are being fetched, just nothing gets rendered. The embedded example on the tutorial page also seems to suffer from the same issue. I tried this out in Safari and everything seems to work as expected - any ideas what might be wrong with Chrome (Version 110.0.5481.177 (Official Build) (arm64))? Incognito also seems to have the same issue
No description
9 Replies
kapa.ai
kapa.aiβ€’2y ago
Hey @ik! I'm the kapa.ai support bot. I've searched through the docs to try to answer your question. :wave: ---------------------- It looks like you're having trouble getting the auto-generated CRUD pages to work in Chrome. This could be due to a few different things. First, make sure you're using the correct version of Chrome. The version you mentioned (110.0.5481.177) is an old version and may not be compatible with the latest version of Refine. Second, make sure you're using the correct code. The code you provided is for the Ant Design System, but the tutorial you're following is for the Headless version. The code for the Headless version is as follows:
import { Refine } from "@pankod/refine-core";
import routerProvider from "@pankod/refine-react-router-v6";
import dataProvider from "@pankod/refine-simple-rest";
import { HeadlessInferencer } from "@pankod/refine-inferencer/headless";

const App = () => {
return (
<Refine
routerProvider={routerProvider}
dataProvider={dataProvider("https://api.fake-rest.refine.dev")}
resources={[
{
name: "products",
list: HeadlessInferencer,
show: HeadlessInferencer,
create: HeadlessInferencer,
edit: HeadlessInferencer,
},
]}
/>
);
};
export default App;
import { Refine } from "@pankod/refine-core";
import routerProvider from "@pankod/refine-react-router-v6";
import dataProvider from "@pankod/refine-simple-rest";
import { HeadlessInferencer } from "@pankod/refine-inferencer/headless";

const App = () => {
return (
<Refine
routerProvider={routerProvider}
dataProvider={dataProvider("https://api.fake-rest.refine.dev")}
resources={[
{
name: "products",
list: HeadlessInferencer,
show: HeadlessInferencer,
create: HeadlessInferencer,
edit: HeadlessInferencer,
},
]}
/>
);
};
export default App;
You can find more information about the Headless version of Refine in the documentation (https://refine.dev/docs/tutorial/getting-started/headless/generate-crud-pages). If you're still having trouble, please reach out to the Refine team for further assistance. ----------------------
kapa.ai
kapa.aiβ€’2y ago
Did kapa.ai help answer your question?
<@961698694590255194> kapa.ai is still learning and improving, please let us how it did by reacting with a :thumbsup: or :thumbsdown:
wise-white
wise-whiteβ€’2y ago
The bot was actually right...updating to version Version 111.0.5563.64 (Official Build) (arm64) helped. Any idea what caused this though? I don't think you can expect users to always have the latest version of the browser
conscious-sapphire
conscious-sapphireβ€’2y ago
Hi @ik, i'm suprised to hear that. chrome version should not be problem πŸ€” what was your old version number?
stormy-gold
stormy-goldβ€’2y ago
Chrome (Version 110.0.5481.177 (Official Build) (arm64)
conscious-sapphire
conscious-sapphireβ€’2y ago
oh sorry πŸ˜„ i didn't see.
conscious-sapphire
conscious-sapphireβ€’2y ago
@ik Hi again, mine version still is Version 110.0.5481.177 (Official Build) (arm64) . same as your old version and tutorial project works as expected. doc live-previews works too. can you give us more information ? did you change anything else?
No description
wise-white
wise-whiteβ€’2y ago
Nothing else. The browser restarted when it updated. Perhaps a case of turning it off and on again fixed it πŸ˜‚
conscious-sapphire
conscious-sapphireβ€’2y ago
πŸ˜„ anyway. we will keep in mind. thank you for helping us. please keep inform us on any problems πŸ™