Skip to content

Commit

Permalink
DataGrid CheckBoxList filter loading indicator added
Browse files Browse the repository at this point in the history
  • Loading branch information
enchev committed Jan 6, 2025
1 parent 168c071 commit e889436
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Radzen.Blazor/RadzenDataGridHeaderCell.razor
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
}
else
{
<RadzenProgressBarCircular Style="position:absolute;width:100%;" Visible="@isLoading" Value="100" ShowValue="false" Mode="ProgressBarMode.Indeterminate" />
<RadzenListBox AllowVirtualization="@Column.AllowCheckBoxListVirtualization" AllowClear="true" Multiple="true" Style="height: 300px"
TValue="IEnumerable<object>" Value=@Column.GetFilterValue() Change="@ListBoxChange"
Data=@filterValues Count=@filterValuesCount LoadData="@LoadFilterValues"
Expand Down Expand Up @@ -205,9 +206,14 @@ else
int filterValuesCount;
internal IEnumerable filterValues;
string loadDataArgsString;
bool isLoading = false;

async Task LoadFilterValues(LoadDataArgs loadDataArgs)
{
isLoading = true;

await Task.Yield();

var property = Column.Property != Column.FilterProperty && !string.IsNullOrEmpty(Column.FilterProperty) ? Column.Property :
Column.GetFilterProperty();

Expand Down Expand Up @@ -281,6 +287,8 @@ else
await InvokeAsync(StateHasChanged);
}
}

isLoading = false;
}

void ListBoxChange(object args)
Expand Down

0 comments on commit e889436

Please sign in to comment.