Skip to content

Commit 8067c46

Browse files
committed
docs(menu): change OnSelect event to OnClick
1 parent 510b547 commit 8067c46

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

components/menu/events.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@ position: 20
1212

1313
This article explains the events available in the Telerik Menu for Blazor:
1414

15-
* [OnSelect](#onselect)
15+
* [OnClick](#onclick)
1616

17-
## OnSelect
17+
## OnClick
1818

19-
The `OnSelect` event fires when the user clicks or taps on a menu item. It receives the model of the item as an argument that you can cast to the concrete model type you are using.
19+
The `OnClick` event fires when the user clicks or taps on a menu item. It receives the model of the item as an argument that you can cast to the concrete model type you are using.
2020

21-
You can use the `OnSelect` event to react to user choices in a menu without using navigation to load new content automatically.
21+
You can use the `OnClick` event to react to user choices in a menu without using navigation to load new content automatically.
2222

23-
>caption Handle OnSelect
23+
>caption Handle OnClick
2424
2525
````CSHTML
2626
@using Telerik.Blazor.Components.Menu
2727
28-
<TelerikMenu Data="@MenuItems" OnSelect="@((MenuItem item) => OnSelectHandler(item))">
28+
<TelerikMenu Data="@MenuItems" OnClick="@((MenuItem item) => OnClickHandler(item))">
2929
</TelerikMenu>
3030
31-
Last item selected: @SelectedItem?.Text
31+
Last clicked item: @ClickedItem?.Text
3232
3333
@code {
34-
public MenuItem SelectedItem { get; set; }
34+
public MenuItem ClickedItem { get; set; }
3535
36-
protected void OnSelectHandler(MenuItem item)
36+
protected void OnClickHandler(MenuItem item)
3737
{
38-
SelectedItem = item;
38+
ClickedItem = item;
3939
}
4040
4141
public List<MenuItem> MenuItems { get; set; }

components/menu/orientation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ You can control the orientation of the Menu for Blazor so that it orders its ite
2121
````CSHTML
2222
@using Telerik.Blazor.Components.Menu
2323
24-
<TelerikMenu Data="@MenuItems" OnSelect="@OnSelect">
24+
<TelerikMenu Data="@MenuItems" OnClick="@OnClick">
2525
</TelerikMenu>
2626
27-
Last item selected: @SelectedItem?.Text
27+
Last clicked item: @ClickedItem?.Text
2828
2929
@code {
3030
public List<MenuItem> MenuItems { get; set; }

components/menu/templates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ You can use the template to render arbitrary content according to your applicati
106106
@using Telerik.Blazor.Components.Menu
107107
@inject IUriHelper urlHelper
108108
109-
<TelerikMenu Data="@MenuItems" OnSelect="@((MenuItem item) => OnSelect(item))">
109+
<TelerikMenu Data="@MenuItems" OnClick="@((MenuItem item) => OnClick(item))">
110110
<ItemTemplate Context="item">
111111
@{
112112
if (EqualityComparer<MenuItem>.Default.Equals(item, SelectedMenuItem))
@@ -173,7 +173,7 @@ You can use the template to render arbitrary content according to your applicati
173173
base.OnInitialized();
174174
}
175175
176-
private void OnSelect(MenuItem item)
176+
private void OnClick(MenuItem item)
177177
{
178178
if (IsInternalPage(item.Url))
179179
{

0 commit comments

Comments
 (0)