fix pager con selettore tendina
This commit is contained in:
@@ -1,21 +1,42 @@
|
||||
<div class="input-group input-group-sm">
|
||||
<input @bind-value="numRecord" @bind-value:event="oninput" type="text" class="form-control" />
|
||||
<div class="input-group-append">
|
||||
<button @onclick="reportChange" class="btn btn-success input-group-text"># record</button>
|
||||
@*<span class="input-group-text"># record</span>*@
|
||||
</div>
|
||||
row/pag:
|
||||
<select @bind="@numRecord" class="form-control form-control-sm">
|
||||
<option value="5">5</option>
|
||||
<option value="10">10</option>
|
||||
<option value="25">25</option>
|
||||
<option value="50">50</option>
|
||||
<option value="100">100</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@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<int> numRecordChanged { get; set; }
|
||||
|
||||
private async Task reportChange()
|
||||
private void reportChange()
|
||||
{
|
||||
await numRecordChanged.InvokeAsync(numRecord);
|
||||
numRecordChanged.InvokeAsync(numRecord);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user