Skip to content

How to only show a single instance even if a user is able to click button multiple times due to server latency? #514

Closed Answered by DEO3
DEO3 asked this question in Q&A
Discussion options

You must be logged in to vote

While ultimately Blazor WASM would likely be the better choice for an application that might have to deal with high user latency, I believe I've been able to resolve this in my Blazor server application by taking advantage of Blazored Modal's ability to return data, such as when the modal has been closed.

Basically I set an 'isModalShowing' flag to true when the button to show the modal is first clicked. Once that's set to true it will catch any additional clicks. I then I await the modal.Result.Data, which will be returned when the modal is eventually closed. Once I receive the result I know the modal has been closed and I can then continue execution which will set the 'isModalShowing' f…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DEO3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant