You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 7, 2019. It is now read-only.
I'm trying to figure out how to update the modal after it's been displayed, like to update a price estimate value. Right now I'm able to modal.add(myComponent, {}) to create a modal and render myComponent but I can't figure out how to update the component. I could remove the modal and display it again with the new props but that would discard the user updates inside the modal, such as form fields.
I'm currently getting around this issue by using connect() on myComponet to link it directly to the store, but I'd prefer to use a basic component and not a redux container. What's the best way to do this? Maybe I should always specify a generic container for the modal and one of the options will be the actual component I want displayed? I feel like the problem will be that the container will need to know about every property any modal will need and will pass those to every modal it displays.
I'm trying to figure out how to update the modal after it's been displayed, like to update a price estimate value. Right now I'm able to
modal.add(myComponent, {})to create a modal and rendermyComponentbut I can't figure out how to update the component. I could remove the modal and display it again with the new props but that would discard the user updates inside the modal, such as form fields.I'm currently getting around this issue by using
connect()onmyComponetto link it directly to the store, but I'd prefer to use a basic component and not a redux container. What's the best way to do this? Maybe I should always specify a generic container for the modal and one of the options will be the actual component I want displayed? I feel like the problem will be that the container will need to know about every property any modal will need and will pass those to every modal it displays.