Skip to content

Commit

Permalink
feat(mudblazor): pass state and filter to data loaded callback
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicGD committed Feb 21, 2023
1 parent 633e7f2 commit b297d4a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Sitko.Core.Blazor.MudBlazorComponents;

[EditorRequired] [Parameter] public RenderFragment<TItem?>? ChildContent { get; set; }

[Parameter] public Func<Task>? OnDataLoaded { get; set; }
[Parameter] public Func<TableState, TFilter, Task>? OnDataLoaded { get; set; }

[Parameter] public string? Title { get; set; }
[Parameter] public bool EnableSearch { get; set; } = true;
Expand Down Expand Up @@ -202,7 +202,7 @@ protected async Task DoAddUrlParamsAsync(TableState state)
if (OnDataLoaded is not null)
{
Logger.LogDebug("Execute OnDataLoaded");
await OnDataLoaded();
await OnDataLoaded(LastState, LastFilter);
}

IsFirstLoad = false;
Expand Down Expand Up @@ -403,4 +403,3 @@ public static void Toggle<T>(this List<T> list, T value)
}
}
}

0 comments on commit b297d4a

Please sign in to comment.