Skip to content

Blazor virtualization does not work properly #26424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
MarvinKlein1508 opened this issue Sep 29, 2020 · 6 comments · Fixed by #26432
Closed

Blazor virtualization does not work properly #26424

MarvinKlein1508 opened this issue Sep 29, 2020 · 6 comments · Fixed by #26432
Assignees
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed
Milestone

Comments

@MarvinKlein1508
Copy link

Describe the bug

The virtualization does not render more elements when scrolling. It only works for me if I right click in the browser and click on inspect element on the last row. I need to click on the div for the new elements once in the DOM in order to get it working while scrolling.

I tried it in Chrome and Firefox (Latest versions)

To Reproduce

I have created a small repository which has the same behaviour as mentioned above.
https://github.com/MarvinKlein1508/BlazorVirtualization

Exceptions (if any)

None.

Further technical details

  • ASP.NET Core version: 5.0.0-rc.1.20451.17
  • Include the output of dotnet --info:
    .NET Core SDK (gemäß "global.json"):
    Version: 5.0.100-rc.1.20452.10
    Commit: 473d1b592e

Laufzeitumgebung:
OS Name: Windows
OS Version: 10.0.19041
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.100-rc.1.20452.10\

Host (useful for support):
Version: 5.0.0-rc.1.20451.14
Commit: 38017c3935

.NET SDKs installed:
3.1.400-preview-015203 [C:\Program Files\dotnet\sdk]
3.1.402 [C:\Program Files\dotnet\sdk]
5.0.100-rc.1.20452.10 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0-rc.1.20451.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0-rc.1.20451.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.0-rc.1.20452.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download

  • Visual Studio Version 16.8.0 Preview 3.1
@javiercn javiercn added the area-blazor Includes: Blazor, Razor Components label Sep 29, 2020
@pranavkm
Copy link
Contributor

This might be a dupe of #26353 which was addressed in 5.0-rc2. Could you try using our nigthtlies to see if using it resolves your issue: https://github.com/dotnet/installer#installers-and-binaries.

@pranavkm pranavkm added the Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. label Sep 29, 2020
@SteveSandersonMS
Copy link
Member

To me it looks more like a dupe of #25915. To check whether this is the case, could you try amending your repro to specify an ItemSize parameter on your <Virtualize>? If the ItemSize you pass is correct, does the problem go away?

@MarvinKlein1508
Copy link
Author

@pranavkm I created the same project with RC2. Now I don't get any more results, not even after I have inspected the element.
@SteveSandersonMS adding an ItemSize makes it worse. E.G. when I set it to 40, I instantly see some results with ID 3900+ those become hidden after a few seconds and it returns back to the default view which again does not work while scrolling.

@ghost ghost added Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. and removed Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. labels Sep 29, 2020
@MarvinKlein1508
Copy link
Author

Hello again,

I have seen this in the DOM:
<div style="height: 975152,8px;" _bl_065e16a4-efdb-4e97-87b3-eb034b1e0ab9=""></div>

Firefox says the following: Invalid value for heigth attribute. Perhaps it helps when you switch from , to .

@SteveSandersonMS
Copy link
Member

SteveSandersonMS commented Sep 29, 2020

Oh wow yes, this is a really striking bug. The <Virtualize> component incorrectly uses culture-specific formatting for the spacer height values, leading to being totally broken if the browser language uses , as the decimal separator.

I checked your repro example and it works fine with my browser by default, but if I switch the language to one that uses , as decimal separator, I also observe that it is broken. Thanks for reporting this, @MarvinKlein1508!

@dotnet/aspnet-blazor-eng This is definitely something we'll want to fix. It's a one-liner fix.

@SteveSandersonMS
Copy link
Member

Submitted PR with a fix at #26432

@pranavkm pranavkm added bug This issue describes a behavior which is not expected - a bug. and removed Needs: Attention 👋 This issue needs the attention of a contributor, typically because the OP has provided an update. labels Sep 29, 2020
@pranavkm pranavkm added this to the 5.0.0 milestone Sep 29, 2020
@pranavkm pranavkm linked a pull request Sep 29, 2020 that will close this issue
@HaoK HaoK added the Done This issue has been fixed label Sep 30, 2020
@HaoK HaoK closed this as completed Sep 30, 2020
@ghost ghost removed the Working label Sep 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Oct 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-blazor Includes: Blazor, Razor Components bug This issue describes a behavior which is not expected - a bug. Done This issue has been fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants