Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Fixes #217 - bug where the selected value is not displayed #278

Merged
merged 1 commit into from
Jul 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/Blazored.Typeahead/BlazoredTypeahead.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
}
}

protected override void OnParametersSet()
{
Initialize();
}

private void Initialize()
{
SearchText = "";
Expand Down Expand Up @@ -240,7 +245,7 @@ private async Task HandleKeydown(KeyboardEventArgs args)
{
await ResetControl();
}

}

private async Task HandleKeyup(KeyboardEventArgs args)
Expand Down Expand Up @@ -403,7 +408,7 @@ private async Task HookOutsideClick()
private async Task SelectResult(TItem item)
{
var value = ConvertMethod(item);

if (IsMultiselect)
{
var valueList = Values ?? new List<TValue>();
Expand Down