jolly-crimson
jolly-crimson10mo ago

Inferencer considered a field as a relation and decided not to render it

Hey guys, could you please help me understand what happened: 1. fields [cust_id, id] returned from api, but only id is rendered 2. according to the doc field cust_id had not to be considered as relation How to make cust_id visible? what am I doing wrong or misunderstand? versions: "@mui/x-data-grid": "6.11.2", "@refinedev/cli": "2.7.6", "@refinedev/core": "4.34.0", "@refinedev/inferencer": "4.5.4", "@refinedev/kbar": "1.3.0", "@refinedev/mui": "5.13.4", "@refinedev/react-hook-form": "4.8.2", "@refinedev/react-router-v6": "4.5.0", "@refinedev/simple-rest": "4.5.0",
No description
5 Replies
kapa.ai
kapa.ai10mo ago
Hi @forgo710. I'm kapa.ai, 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 extracts provided do not contain specific details about handling fields returned from an API and how to render them using refine and Material UI DataGrid. However, in general, if you want to render a specific field from the API response in the DataGrid, you need to define it in the columns array and map it to the corresponding key from the API response. If the cust_id field is not being rendered, it might be because it's not defined in the columns array. For more detailed information, I would recommend checking the refine's useDataGrid hook documentation (https://refine.dev/docs/api-reference/mui/hooks/useDataGrid/) and the Material UI DataGrid component documentation (https://mui.com/x/react-data-grid/). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai10mo ago
<@297379262288232448> kapa.ai is still learning and improving, please let us know how it did by reacting below
jolly-crimson
jolly-crimson10mo ago
Also there is a inferencer/src/field-transformers/relation-to-fieldable.ts maybe it had to help, but it didn't
extended-salmon
extended-salmon10mo ago
Hi, I don't understand what you want to ask. Can you send me a codesanbox so I can understand the problem and help you?
jolly-crimson
jolly-crimson10mo ago
mentioned field came from api and isn't shown on the UI, isn't it clear? will try to build an example