blazorbootstrap icon indicating copy to clipboard operation
blazorbootstrap copied to clipboard

Modal await _modal.HideAsync(); doesn't reset Html Markup

Open khallid-itdevtech opened this issue 1 year ago • 2 comments

private Modal _modal = default!; ....... var parameters = new Dictionary<string, object>() { {"OnCancel", new EventCallbackFactory().Create(this, OnModalCancel)}, {"OnSuccessful", new EventCallbackFactory().Create(this, AddSuccessful)} }; await _modal.ShowAsync<MyModal>(Title = "Add Category", parameters: parameters); ......

call await _modal.HideAsync(); on Event handle by button inside modal. this just hide the modal doesn't reset the markup as it does from header X button there isn't any function to destroy modal

Versions (please complete the following information):

  • .NET Version: [ .NET 8]
  • BlazorBootstrap: [2.2.0]
  • Blazor Server: [Server]
  • Blazor Interactive Render Mode: [Server]
  • Blazor Interactivity Location: [component]

Desktop (please complete the following information):

  • OS: [Windows10]
  • Browser [Chrome]
  • Version [Latest]

khallid-itdevtech avatar Sep 27 '24 10:09 khallid-itdevtech

I'm experiencing the same issue with subsequent uses of the modal initially displaying previously entered data. Is there a workaround for this?

tippers424 avatar Jul 30 '25 10:07 tippers424

I found a workaround in issue #393

tippers424 avatar Jul 30 '25 10:07 tippers424