From a5d3eaa761eeb69d77ff9154fa9d0cd194da22e4 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 17 May 2021 14:36:30 +0200 Subject: [PATCH] fix pager con selettore tendina --- MP.Stats/Components/DataPager.razor | 37 ++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/MP.Stats/Components/DataPager.razor b/MP.Stats/Components/DataPager.razor index 8516e5d9..527b8e78 100644 --- a/MP.Stats/Components/DataPager.razor +++ b/MP.Stats/Components/DataPager.razor @@ -1,21 +1,42 @@ 
- -
- - @*# record*@ -
+ row/pag:  +
@code { + protected int _numRecord { get; set; } = 10; + [Parameter] - public int numRecord { get; set; } = 10; + public int numRecord + { + get + { + return _numRecord; + } + set + { + bool doReport = !_numRecord.Equals(value); + _numRecord = value; + if (doReport) + { + reportChange(); + } + } + } [Parameter] public EventCallback numRecordChanged { get; set; } - private async Task reportChange() + private void reportChange() { - await numRecordChanged.InvokeAsync(numRecord); + numRecordChanged.InvokeAsync(numRecord); } + } \ No newline at end of file