havit / Havit.Blazor

Free Bootstrap 5 components for ASP.NET Blazor + optional enterprise-level stack for Blazor development (gRPC code-first, layered architecture, localization, auth, ...)
https://havit.blazor.eu
MIT License
475 stars 66 forks source link

[HxOffcanvas] Immediate Hide after Show leads to unexpected results #753

Closed hakenr closed 5 months ago

hakenr commented 6 months ago

(real scenario: doubleclicking a toggle button)

Reproduction steps:

private async Task HandleClick()
{
  await offcanvasComponent.ShowAsync();
  await offcanvasComponent.HideAsync();
}

...we need to adopt a unified approach like RegisterOnAfterRenderAction() to enable sequential calls to JavaScript methods.

cc @Arnnes

hakenr commented 5 months ago

Fixed by 1a81709ca9cdcd8b4bd3698180a89e40ac2ed5aa