Answer the question
In order to leave comments, you need to log in
How to pass a form and a button handler to a modal window?
I have:
1. A component with a "Buy" button.
2. A component with an order form.
3. Component with the "Request a call" button.
4. A component with a form for ordering a callback.
5. Modal window component.
Depending on which button was clicked ("Buy" or "Request a call"), we show the required form, pass it to the modal window and open it. There are two buttons "Submit" and "Close" in the model window. That is, we either submit the form or close the window. At the same time, it is desirable to make the components as independent from each other as possible. What do you advise?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question