- Result: Lable
@song?, Image
@singer?, Size
@size?
+
+ Result
+
+ Lable: @song?.ToString() | Image: @singer?.ToString() | Size: @size?.ToString()
+
From a list of Option<T>
+
+ From Option<string>
items
+
+
+ Selected Value: @stringValue
+ Selected Item
+ Value: @selectedStringOption?.Value (Type: @(selectedStringOption?.GetType()))
+ Text: @selectedStringOption?.Text
+
+
+ From Option<int>
items
+
+
+ Selected Value: @intValue
+ Selected Item
+ Value: @selectedIntOption?.Value (Type: @(selectedIntOption?.GetType()))
+ Text: @selectedIntOption?.Text
+
+
+
+
Autocomplete
+
+ Inline Autocomplte
+
+ List Autocomplte
+
+ Both Autocomplte
+
+
+
+
Option template
+
+
+
+
+ @context.FirstName (@context.LastName)
+
+
+
+ Selected option: @selectedEmployee?.FirstName @selectedEmployee?.LastName
+ @if (selectedEmployee != null && selectedEmployee.BirthDate != null)
+ {
+
+ (@selectedEmployee.BirthDate.ToString("yyyy-MM-dd"))
+
+ }
+
+ Selected value: @selectedEmployValue
+ Message: @message;
+
+
+
@code {
string? song;
string? singer;
string? size;
+ Employee selectedEmployee = default!;
+ string? selectedEmployValue;
+ string? message;
+
protected override void OnInitialized()
{
singer = dataService.Singers.FirstOrDefault();
}
+
+ Option
selectedStringOption = default;
+ string? stringValue;
+ Option selectedIntOption = default;
+ string? intValue;
+
+ List