rare-sapphire
rare-sapphireโ€ข2y ago

useDrawerForm with additional parameters

Hi there, I am trying to use useDrawerForm . I have cards for different product type/categories. And when the user clicks on one of the product type I want to show a create drawer which would create corresponding product in the category. Now my question is how do i pass the categoryId or product Type id to the drawer. So it gets that context.
3 Replies
genetic-orange
genetic-orangeโ€ข2y ago
Hey @ramkumar, There are two way to do it: 1- You can use setId method which return from useDrawerForm. When you set an id by setId function your drawer form fill out with related id request. 2- Also, you can pass the id value to show method which you used open a drawer form.
rare-sapphire
rare-sapphireโ€ข2y ago
@salihozdemir how do we reference that Id inside of the form component? also can we only send id or props also? I figured out how to send the Id and get it referenced inside of the component. @salihozdemir thanks for your inputs!
genetic-orange
genetic-orangeโ€ข2y ago
I'm glad to hear that! Happy coding ๐Ÿš€