An unhandled error has occurred.
Reload
🗙
@code {
private bool _drawerOpen = true;
private string _searchBarText = "";
private void OnSearchBarKeyDown(KeyboardEventArgs args)
{
if (args.Key == "Enter" && !string.IsNullOrEmpty(_searchBarText))
{
NavigationManager.NavigateTo($"/search/{System.Web.HttpUtility.UrlEncode(_searchBarText)}");
_searchBarText = "";
}
}
}