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

[HxGrid] Data is never applied or loaded - DataProvider does not appear to be called at any point in component lifecycle #758

Closed eklein217 closed 6 months ago

eklein217 commented 6 months ago

Using sample code below: image

The breakpoint on line 22 is never hit. This leads to a grid which is permanently loading data. There does not appear to be a way to refresh the data manually.

image

hakenr commented 6 months ago

I think this is a tooling issue (Visual Studio). The Blazor debugging is still a bit bumpy. Try to run the code without debugging (Ctrl+F5), or without the breakpoint in GetGridData method.

eklein217 commented 6 months ago

@hakenr Appears the same. I do want to point out that my problem here is not with the debugging (though I would hope that debugging would be supported for all components), but the actual grids are failing to load from their data source. I've tried multiple versions of the library, including the most recent. Is there something wrong with my code? It's pulled (almost) directly from the docs.

hakenr commented 6 months ago

I just double-checked the scenario you are presenting and I'm unable to reproduce your issue. Can you provide us with a minimal repro project (GitHub repo) where the issue reproduces? Thank you

muipsd commented 6 months ago

I am facing the same behavior. Blazor Server App -> .net 8.

eklein217 commented 6 months ago

@muipsd That's my current configuration as well.

eklein217 commented 6 months ago

@hakenr Apologies for the delay. https://github.com/evklein/HavitGridRenderBugFixRepo/ Please check out this repository to see the error in action.

hakenr commented 6 months ago

Thanks for preparing the repro. See the PR https://github.com/evklein/HavitGridRenderBugFixRepo/pull/1 for fixes need.

  1. You have to enable the interactivity for the app/components. See https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-8.0
  2. The TotalCount in DataProvider response has to have a correct value.
eklein217 commented 6 months ago

@hakenr Appreciate the help! Might I suggest adding a note on your Getting Started page? Doesn't seem to be any setup difference between wasm and server rendered apps listed.