Aman-Mittal opened a new issue, #743:
URL: https://github.com/apache/fineract-backoffice-ui/issues/743
## What happens
`/loans` on a tenant with one loan shows:
```
Items per page: 10 1 - 1 of many
```
`GET /loans?offset=0&limit=10` answered:
```json
{ "totalFilteredRecords": 1, "pageItems": [ … one loan … ] }
```
So the server reported an exact count of 1, and the UI hedges it as "many".
## Why #488 didn't cover it
#488 added `exactTotal` to the paginator and had `DataTableComponent` pass
`localLogic()` into it. That fixed the in-memory lists. The issue said
genuinely server-paginated screens were unaffected, but that's only true for
the screens that opt in:
```
$ git grep -n "exactTotal" -- src ':!*.test.ts'
clients-list.component.ts [exactTotal]="exactTotal()" ← only opt-in
data-table.component.ts [exactTotal]="localLogic() || exactTotal()"
paginator.component.ts readonly exactTotal = input(false);
```
`exactTotal` defaults to `false`, so every server-paginated list except
Clients still runs the `length % pageSize === 1` sentinel against a real
`totalFilteredRecords`. That means 1, 11, 21, 101… records show "of many".
The sentinel exists for list endpoints that over-fetch by one to detect a
next page. As far as I can find, only `audit-logs-list.component.ts:445`
(`offset + limit + 1`) and the Clients name search
(`exactTotal.set(!nameSearch)`) produce one. Everywhere else the total is
Fineract's own exact count.
## Suggested fix
Invert the default so the hedge is opt-in where an over-fetch actually
happens:
- `PaginatorComponent.exactTotal` / `DataTableComponent.exactTotal` default
to `true`.
- `audit-logs-list` and the Clients name-search path pass `false`.
That way a new list gets the correct label by default, instead of inheriting
a sentinel it never asked for. A paginator test for `length = 1, pageSize = 10`
with the default input would lock it in.
## Steps
1. Sign in, then **Loans** on a tenant with 1, 11 or 21 loans.
2. The footer reads `… of many`.
## Tested against
Deployed build of `main`
(https://aman-mittal.github.io/fineract-backoffice-ui), backend
`sandbox.mifos.community`, Chrome 1440×900, 2026-10-16.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]