flat-fuchsia
flat-fuchsia17mo ago

I am using useDrawerForm inside of a list page

I wanted to see if there is a way to pass a query parameter to the list page and open the drawer with default value provided in the query param. Like for ex. /products?category=1 would open the create form with category id 1 filled in.
1 Reply
deep-jade
deep-jade17mo ago
Hey @ramkumar, If you want your form to be filled; 1. The useDrawerForm's action prop must be "edit". 2. In order to fetch form data, you can use useDrawerForm show method like this: show(1). Also you can use setId method from useDrawerForm return values. You can find more information on useDrawerForm doc. https://refine.dev/docs/api-reference/antd/hooks/form/useDrawerForm/