Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

What's are some methodologies for managing modals/modal visibility in .NET Blazor?

$
0
0

I'm trying to figure out how to manage modals in my Blazor application. Currently, I have a Modal component that has a RenderFragment parameter and some callback functions that I'm using for most of the CRUD operations of different entities. The visibility of these modals is being handled by individual visibility Booleans in my on-page markup.e.g.

@if(fooModalVisible){<Modal>{foo form content}</Modal>}@if(barModalVisible){<Modal>{bar form content}</Modal>}...@code{   private bool fooModalVisible { get; set; } = false;   private bool barModalVisible { get; set; } = false;}

How can I manage modal visibility for multiple modals in one component without using individual on-page booleans?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>