[Bug] Cancel Modal created in component in parent
See original GitHub issueI recently upgraded BlazoredModal from 3.0 to 4.1.
I have three razor pages: Search, ImageStack, ImagePopup.
Search has a top search bar that is above all layers. The body reports results of the search.
Search utilizes component ImageStack in the results.
ImageStack helps me manage some html regarding the images returned in a search.
It is also the component that opens the BlazoredModal with Modal.Show<ImagePopup>(null, parameters, options);
In version 3, I could close the modal from search with Modal.Cancel();
if i had @inject IModalService Modal;
up top.
I am guessing with the implementation of instances Modal.Cancel()
on the IModalService no longer exits. However, I cannot find a method to capture all modal instances to close/cancel them all.
To summarize, I want to be able to close all modals when I perform another search or return home. As it is, the modal will continue to stay up with all results appearing in the layers under it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
Hi @joehatescoffee
Please have a look at this and/or this. That shows execatly what you are trying to do I think.
If that doesn’t help, let me know!
This sounds like a design problem and not so much an issue with the model. I don’t think there is any work for us to do here so I’m going to close this issue.
If you need help with your design please ask here and we will help as much as we can.