Aman-Mittal opened a new issue, #182: URL: https://github.com/apache/fineract-backoffice-ui/issues/182
## Business value Angular 22 makes `OnPush` the **default** change detection strategy. A plain component field assigned from an HTTP callback therefore never marks its view dirty, and the value the user should see is simply not rendered. `scripts/audit-async-state.mjs` currently reports **429 such fields across 184 components**. `app-data-table` and the two structural permission directives sit underneath most of the application. Every list screen renders through the table, and `*appHasPermission` / `*appInstitutionFeature` decide what is on screen at all. While these remain built on decorator inputs and `QueryList`, every new screen built on top of them inherits the same failure mode — and `QueryList.changes` does not mark an `OnPush` view dirty, so a late-registered cell template can silently fail to render. Converting the shared primitives first means new work lands correct rather than needing a second pass. This is a prerequisite for the Group (#180) and Center (#181) detail views, which introduce several new screens on top of these pieces. ## Describing the work **`shared/components/data-table`** - `@Input()` → `input()` for all inputs (`title`, `columns`, `data`, `totalRecords`, `pageSize`, `pageIndex`, `pageSizeOptions`, `showSearch`, `searchLabel`, `searchPlaceholder`, `localLogic`, `isLoading`, `helpTextKey`, `createButtonLabel`). `hasError` is already a signal input. - `@Output()` → `output()` for `create`, `searchChange`, `sortChange`, `pageChange`. `retry` is already an `output()`. - `@ContentChildren(CellTemplateDirective)` → `contentChildren()`, replacing the `AfterContentInit` + `QueryList` pairing whose `.changes` does not mark an OnPush view dirty. - Replace `ngOnChanges` + `recompute()` with `computed()`. Signal inputs do not participate in `ngOnChanges`, so this is a required part of the conversion, not an optional tidy-up. The rendered rows and the paginator total become derived values rather than imperatively recomputed state. **`shared/directives/has-permission`, `shared/directives/has-institution-feature`** - `@Input()` setters → `input()`, with the view driven by a single `effect()` rather than one `updateView()` call per setter. ## Verification - `app-data-table` is consumed by roughly 40 components; the existing unit specs and the mocked Playwright suite (192 tests) are the regression net, and both must stay green. - `npm run lint` currently carries a suppressions baseline for `@angular-eslint/prefer-signals` and `prefer-output-emitter-ref`; this work should reduce that baseline rather than add to it (`npm run lint:prune`). - The audit count in `scripts/audit-async-state.mjs` should not increase. ## Scope In scope: the data-table component and the two structural directives. Out of scope: the remaining 429 fields across feature components, and `provideZonelessChangeDetection()` / dropping `zone.js`, which follow once the feature components are converted. -- 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]
