feat(centralui): KeysetPager reusable cursor-pagination component (T35b)

This commit is contained in:
Joseph Doherty
2026-06-18 19:28:15 -04:00
parent 4755ceee81
commit 6a34ed9ed6
2 changed files with 118 additions and 0 deletions
@@ -0,0 +1,24 @@
@* 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; }
}