-
Notifications
You must be signed in to change notification settings - Fork 380
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
[TreeView] Add Items
and LazyLoadItems
properties
#1945
Conversation
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 58.6%
|
Does it also solve the very slow select of a TreeItem? |
You can try with your own sample, but my tests were based on over 120,000 items :-) |
Is this change not planned in the end? :( |
I think it's a mistake... @vnbaaij I'm reopening the PR and restoring my branch ;-) |
Sorry, was spring-cleaning the branches a bit too enthousiastically 🧹🪣🧽 |
What are the next steps to go forward with that PR? Is there anything I could do to help? |
I will finish the TODO list in few days 😊 |
…rosoft/fluentui-blazor into users/dvoituron/treeview-items
…rosoft/fluentui-blazor into users/dvoituron/treeview-items
[TreeView] Add
Items
andLazyLoadItems
propertiesIn response to several requests for a TreeView component that could display a large amount of data, we've added these functionalities:
Add an
Items
attribute to bind a list of elements and sub-elements (objects implementingITreeViewItem
).The included
TreeViewItem
class already implements this interface. You can use it.Add a
LazyLoadItems
attribute to render HTML only when nodes are expanded.Add an
ItemTemplate
to allow complete customization of each element.Add the bindable
SelectedItem
property to manage the selectedITreeViewItem
.Add the
OnExpandedAsync
method to enable dynamic loading of sub-items.For example, to display an "unlimited" tree view as in this second example.
Example
Example: managing a list of "non-predefined" items.
Unit Tests