Nested
I am trying to add nested resources, List inside Show (for one-to-many) also have a create in list using drawerform, but drawer form is catching the context of show not the List
27 Replies
Hey @bhk2988 ,
Sorry, I don't fully understand. Can you give some example?
ugly-tan•3y ago
![No description](https://cdn.answeroverflow.com/947471579791634482/unknown.png)
ugly-tan•3y ago
I am creating something like this
DIstribution -> has many versions
I wan to add version to that distribution directly from here
But when I click on create
ugly-tan•3y ago
![No description](https://cdn.answeroverflow.com/947471915671490580/unknown.png)
ugly-tan•3y ago
It is showing Distribution and not version
You can use "resource" and "action" properties of useDrawerForm and can access active distribution id from id property of useShow
As in this example, you can add the distributionId to your form data by overrriding the onFinish property of useDrawerForm. https://refine.dev/docs/guides-and-concepts/upload/base64-upload/
Base64 Upload | refine
By encoding your files and images from your forms to Base64 you can change all files needed for the upload to Base64 format before the submit. This can be done via the onFinish property of the `` component that comes with Ant Design
Also you can override Create component' resource, title, etc properties.
https://refine.dev/docs/ui-frameworks/antd/components/basic-views/create/#resource
Create | refine
`` provides us a layout to display the page. It does not contain any logic but adds extra functionalities like action buttons and giving titles to the page.
ugly-tan•3y ago
I have passed resource to create
![No description](https://cdn.answeroverflow.com/947556832405254144/unknown.png)
ugly-tan•3y ago
But it still showing clone their
I hv managed to remove it by setting tags property of page header to empty array but still this should be the default behavior?
Uhmm looks like a bug. Could you create a issue?
ugly-tan•3y ago
Sure
Also can u tell how we can manage redirect ?
as there is no page component for this
You can use useNavigation hooks
useNavigation | refine
refine uses routerProvider and comes with all redirects out of the box. It allows you to manage your routing operations in refine. Using this hook, you can manage all the routing operations of your application very easily.
ugly-tan•3y ago
After form is submited API is hit and its redirected to "list" of the resource by default but what if I want to stop the redirection