Skip to content

Commit

Permalink
Merge pull request #297 from microsoft/ux-handling-for-isLoading
Browse files Browse the repository at this point in the history
ux handling for isLoading
  • Loading branch information
gloveboxes authored Jun 7, 2024
2 parents e852dbb + fb61b22 commit 0e13b3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</MudStack>

<MudIconButton Icon="@Icons.Material.Filled.Refresh" Variant="Variant.Filled" Color="Color.Primary"
Size="Size.Small" Style="width: 80px;" OnClick="RefreshData" />
Size="Size.Small" Style="width: 80px;" OnClick="RefreshData" Disabled="@IsLoading"/>

<MudPaper Class="pa-10 ma-2" Elevation="1">
<MudChart ChartType="ChartType.Line" ChartSeries="@ActiveUsersChartSeries" XAxisLabels="@ActiveUsersChartLabels" Width="100%" Height="400px">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,15 @@ public partial class EventMetrics

private async Task GetData()
{
if (IsLoading)
{
return;
}

IsLoading = true;


(AttendeeCount, RequestCount) = MetricService.GetAttendeeMetricsAsync(EventId);
List<EventMetricsData> MetricsData = await MetricService.GetEventMetricsAsync(EventId);
Event = await EventService.GetEventAsync(EventId);

if (MetricsData is null)
{
IsLoading = false;
return;
}

Expand Down

0 comments on commit 0e13b3d

Please sign in to comment.