feat(centralui): KeysetPager reusable cursor-pagination component (T35b)
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user