-
Notifications
You must be signed in to change notification settings - Fork 8
/
ListboxInDialog.razor
40 lines (35 loc) · 1.06 KB
/
ListboxInDialog.razor
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
35
36
37
38
39
40
@inherits IgnisRigidComponentBase
<CustomDialog Open="Open" OpenChanged="OpenChanged">
<Listbox @bind-Value="_selectedType">
<ListboxButton Id="listbox-button">
</ListboxButton>
<Transition AsComponent="typeof(Fragment)"
Leave="duration-100"
Context="transition">
<ListboxOptions @attributes="transition.Attributes">
@foreach (var option in _options)
{
<ListboxOption @key="option.Name"
Value="option"
Context="_">
@option.Name
</ListboxOption>
}
</ListboxOptions>
</Transition>
</Listbox>
</CustomDialog>
@code
{
private readonly Type[] _options =
{
typeof(string),
typeof(int),
typeof(bool)
};
private Type? _selectedType;
[Parameter]
public bool Open { get; set; }
[Parameter]
public EventCallback<bool> OpenChanged { get; set; }
}