You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Aman-Mittal (via GitHub)" <gi...@apache.org> on 2026/10/16 05:28:49 UTC

[I] Server-paginated lists still show "of many" for an exact totalFilteredRecords (follow-up to #488) [fineract-backoffice-ui]

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: issues-unsubscribe@fineract.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Server-paginated lists still show "of many" for an exact totalFilteredRecords (follow-up to #488) [fineract-backoffice-ui]

Posted by "Aman-Mittal (via GitHub)" <gi...@apache.org>.
Aman-Mittal commented on issue #743:
URL: https://github.com/apache/fineract-backoffice-ui/issues/743#issuecomment-6209716695

   Screenshot of `/loans` with exactly one loan on the tenant. The footer reads **1 - 1 of many**:
   
   ![Loans list footer reading 1 - 1 of many for a single loan](https://raw.githubusercontent.com/Aman-Mittal/fineract-backoffice-ui/assets/issue-screenshots/audit-2026-10-16/743-loans-of-many.svg)


-- 
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: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Server-paginated lists still show "of many" for an exact totalFilteredRecords (follow-up to #488) [fineract-backoffice-ui]

Posted by "Aman-Mittal (via GitHub)" <gi...@apache.org>.
Aman-Mittal closed issue #743: Server-paginated lists still show "of many" for an exact totalFilteredRecords (follow-up to #488)
URL: https://github.com/apache/fineract-backoffice-ui/issues/743


-- 
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: issues-unsubscribe@fineract.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org