Skip to content

Commit 6c4264e

Browse files
docs(menU): clarify HasChildren behavior
1 parent dd8702c commit 6c4264e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

_contentTemplates/menu/basic-example.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
Before continuing, make sure you are familiar with the [menu data binding basics]({%slug components/menu/data-binding/overview%}).
33
#end
44

5-
#has-children-behavior-flat-data
6-
for items that have children, you must set it to `true`. If you set it to `false`, child items will not be rendered even if they are present in the data. If there are no child items in the data, an expand icon will not be rendered regardless of its value.
5+
#has-children-behavior
6+
If you set `HasChildren` to `false`, child items will not be rendered even if they are present in the data. If there are no child items in the data, an expand icon will not be rendered regardless of its value.
77
#end

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Flat data means that the entire collection of menu items is available at one lev
1818

1919
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`.
2020

21-
You must also provide the correct value for the `HasChildren` field - @[template](/_contentTemplates/menu/basic-example.md#has-children-behavior-flat-data)
21+
You are *not* required to provide a value for the `HasChildren` field. @[template](/_contentTemplates/menu/basic-example.md#has-children-behavior)
2222

2323
>caption Example of flat data in a menu (for brevity, URLs are omitted)
2424

components/menu/data-binding/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The menu items provide the following features that you control through the corre
2828

2929
* `Id` - a unique identifier for the item. Required for binding to flat data.
3030
* `ParentId` - identifies the parent to whom the item belongs. Required only when binding to flat data. All items with the same `ParentId` will be rendered at the same level. For a root level item, this must be `null`.
31-
* `HasChildren` - whether the item has child items. Required for binding to flat data - @[template](/_contentTemplates/menu/basic-example.md#has-children-behavior-flat-data) With hierarchical data, the menu will render the icon based on the existence of child items, but `HasChildren` will take precedence.
31+
* `HasChildren` - can hide child items. The menu will fetch its children from the data source based on the `Id`-`ParentId` relationships (for flat data) or on the presence of the `Items` collection (for hierarchical data). @[template](/_contentTemplates/menu/basic-example.md#has-children-behavior)
3232
* `Items` - the collection of child items that will be rendered under the current item. Required only when binding to hierarchical data.
3333
* `Text` - the text that will be shown on the item.
3434
* `Icon` / `IconClass` / `ImageUrl` - the [Telerik icon]({%slug general-information/font-icons%}), a class for a custom font icon, or the URL to a raster image that will be rendered in the item. They have the listed order of precedence in case more than one is present in the data (that is, an `Icon` will have the highest importance).

0 commit comments

Comments
 (0)