Skip to content

Commit f681374

Browse files
docs(treeView): flat binding requires at least one null parentId
1 parent a99d42c commit f681374

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/treeview/data-binding/flat-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This article explains how to bind the TreeView for Blazor to flat data.
1616

1717
Flat data means that the entire collection of treeview items is available at one level, for example `List<MyTreeItemModel>`.
1818

19-
The parent-child relationships are created through internal data in the model - the `ParentId` field which points to the `Id` of the item that will contain the current item. The root level has `null` for `ParentId`.
19+
The parent-child relationships are created through internal data in the model - the `ParentId` field which points to the `Id` of the item that will contain the current item. The root level has `null` for `ParentId`. There must be at least one node with a `null` value so that the TreeView renders anything.
2020

2121
You must also provide the correct value for the `HasChildren` field - for items that have children, you must set it to `true` so that the expand arrow is rendered.
2222

0 commit comments

Comments
 (0)