dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.1k stars 9.91k forks source link

Request: SetGlobalKey in Blazor #45961

Open mrpmorris opened 1 year ago

mrpmorris commented 1 year ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe the problem.

1: You are writing a datagrid 2: Your data grid renders out a row per object (Person) 3: You use @Key to ensure that if the rows are reordered then the DOM delta is only small. 4: Your user chooses to group rows by DateOfBirth 5: Your data grid now renders out lots of RowGroup components which, in turn, render out the objects within the group (all people born on that day).

RenderTreeBuilder.SetKey only identifies a unique key within the component being rendered, so when we wish to make it look as though screen content has moved elsewhere it causes larger DOM updates. In the case of moving grid rows from a grid into a RowGroup it causes a DOM update of the entire grid.

Describe the solution you'd like

I'd like a .SetGlobalKey / @GlobalKey pair so Blazor can detect when a chunk of the render tree has effectively moved elsewhere.

Additional context

No response

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost commented 8 months ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.