deep-jade11mo ago

How to use rest api with child components inside a parent component

I have my own api and custom dataprovider for my api, but I am curious how I can generate the base code with MuiInferencer (or write my own) for a child resource/component inside a parent resource/component. I understand that you can use the meta object inside resources to define a child parent relationship but this just creates an extra column in the parent list. I want to be able to display a table of child components inside my parent component's show page. For more context I am using Mui and the relationship between the parent and child is one to many.
2 Replies
kapa.ai11mo ago
Hi @.chasel. I'm, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The information provided in the extracts does not cover how to display a table of child components inside a parent component's show page using MuiInferencer. However, the @refinedev/inferencer package in refine can automatically generate views for your resources. It exports MuiListInferencer, MuiShowInferencer, MuiEditInferencer, MuiCreateInferencer and MuiInferencer components. You can use these components to generate views for your resources based on the data structure of the resource by fetching it using the dataProvider of <Refine/> component. For more detailed information, you can check out the refine documentation ( ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai11mo ago
<@196423433930670080> is still learning and improving, please let us how it did by reacting below