Hello there
I'm having a hard time reusing a form to create and edit data. I want to implement the following behaviour:
-
When I click the New Product modal button, the form opens empty and allows me to create new products. [done]
-
When I click the pencil icon in the table, the form with the MongoDB data opens.
I already have the query, but I don't know where to inject the data. And how to do that without breaking behavior #1 (above)
What is the best way to achieve this? Thanks in advance !!