Skip to content

TreeView: Reload node support to reload only a specific part of the tree#6426

Open
njannink wants to merge 3 commits intomasterfrom
dev/treeview_node_reload
Open

TreeView: Reload node support to reload only a specific part of the tree#6426
njannink wants to merge 3 commits intomasterfrom
dev/treeview_node_reload

Conversation

@njannink
Copy link
Collaborator

Add support for reloading a specific node of the tree, eg for when a child is added/removed from a specific node to force reevaluation of the expand toggle visability.

njannink and others added 3 commits February 26, 2026 11:32
# Conflicts:
#	Documentation/Blazorise.Docs/Resources/docs-api-index.json
#	Documentation/Blazorise.Docs/Resources/docs-index.json
@stsrki
Copy link
Collaborator

stsrki commented Mar 8, 2026

@njannink made some optimizations. Can you recheck the behavior on your side?

@njannink
Copy link
Collaborator Author

njannink commented Mar 9, 2026

Will check will also see if this fixes #6159

@njannink
Copy link
Collaborator Author

@stsrki I don't really know what is the best approach to continue with this. Biggest issue is that the TreeView does support ObservableCollection but only after a node has been expanded so that is making the API a bit confusing. Ideally for HasChildNodes you use something like an IObservable that you subscribe, but that would introduce a dependency on System.Reactive.

We could introduce:

 interface ITreeNode
{
    IEnumerable<T> GetChildren();
    bool HasChildren();
    event EventHandler ChildrenChanged;
}

And then do some automatic binding and also trigger reevalution when the ChildrenChanged is triggered.

Thoughts are welcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants