-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathComboBoxExampleKeyboardNavigation.razor
More file actions
34 lines (30 loc) · 1.5 KB
/
ComboBoxExampleKeyboardNavigation.razor
File metadata and controls
34 lines (30 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@namespace MudExtensions.Docs.Examples
<MudDataGrid Items="@_keys" Dense="true" Striped="true">
<Columns>
<PropertyColumn Property="x => x.Key" />
<PropertyColumn Property="x => x.Description" />
</Columns>
</MudDataGrid>
@code{
List<Keys> _keys = new();
protected override void OnInitialized()
{
_keys.Add(new Keys() { Key = "Space", Description = "Toggle Open/Close" });
_keys.Add(new Keys() { Key = "Escape", Description = "Close" });
_keys.Add(new Keys() { Key = "Enter", Description = "Open/Select" });
_keys.Add(new Keys() { Key = "NumpadEnter", Description = "Open/Select" });
_keys.Add(new Keys() { Key = "ArrowUp", Description = "Active Previous Item" });
_keys.Add(new Keys() { Key = "ArrowDown", Description = "Active Next Item" });
_keys.Add(new Keys() { Key = "Home", Description = "Active First Item" });
_keys.Add(new Keys() { Key = "End", Description = "Active Last Item" });
_keys.Add(new Keys() { Key = "PageUp", Description = "Active 3rd Previous Item" });
_keys.Add(new Keys() { Key = "PageDown", Description = "Active 3rd Next Item" });
_keys.Add(new Keys() { Key = "Ctrl + a", Description = "Select All (Multiselection)" });
_keys.Add(new Keys() { Key = "Printable Characters", Description = "Active Next Item Which Starts With Pressed Key" });
}
protected class Keys
{
public string? Key { get; set; }
public string? Description { get; set; }
}
}