I'm having an issue with the RadzenDropDown component. The LoadData seems to work perfectly, filters to the correct data, but requires two clicks from the user to select the option. This happens anytime LoadData is called. Anyone have an idea about what is going on?
All of the examples use IEnumerable's with DBContext, but my project is not using Entity Framework. I am using Dapper. I can link my Service and Dapper code too if needed, but I didn't think it would be helpful.
Thank you in advance!
@page "/"
@inject MainService _db;
<div class="col-3 p-3">
@if (courses != null)
{
<RadzenDropDown AllowClear="true" TValue="string" Class="w-100"
LoadData=@LoadData AllowFiltering="true"
Data=@courses TextProperty="CourseTitle" ValueProperty="Id" />
}
</div>
@code {
private List<CourseModel> courses;
protected override async Task OnInitializedAsync()
{
courses = await _db.GetCourses("A");
}
private async void LoadData(LoadDataArgs args)
{
if (!string.IsNullOrEmpty(args.Filter))
{
courses = await _db.GetCourses(args.Filter);
}
await InvokeAsync(StateHasChanged);
}
}