Files
ScadaBridge/src/ZB.MOM.WW.ScadaBridge.CentralUI/Components/Shared/KeysetPager.razor
T

25 lines
1.0 KiB
Plaintext

@* Reusable keyset (cursor) pagination button bar — purely presentational.
All cursor/navigation logic lives in the consuming page via callbacks. *@
<div class="d-flex align-items-center gap-2">
<button class="btn btn-outline-secondary btn-sm"
data-test="keyset-prev"
disabled="@(!CanGoBack || Disabled)"
@onclick="OnPrevious">Previous</button>
<span data-test="keyset-summary">Page @PageNumber · @RowCount rows</span>
<button class="btn btn-outline-secondary btn-sm"
data-test="keyset-next"
disabled="@(!HasNextPage || Disabled)"
@onclick="OnNext">Next</button>
</div>
@code {
[Parameter] public int PageNumber { get; set; } = 1;
[Parameter] public int RowCount { get; set; }
[Parameter] public bool CanGoBack { get; set; }
[Parameter] public bool HasNextPage { get; set; }
[Parameter] public bool Disabled { get; set; }
[Parameter] public EventCallback OnPrevious { get; set; }
[Parameter] public EventCallback OnNext { get; set; }
}