Aman-Mittal opened a new issue, #163:
URL: https://github.com/apache/fineract-backoffice-ui/issues/163

   Any component that loads data in `ngOnInit`/constructor via `.subscribe()` 
into a
     **plain class property** (e.g. `this.offices = data`) feeding a child 
component's
     `[data]`/`[isLoading]` input is affected. The HTTP call succeeds and the 
property
     is
     correctly reassigned (confirmed via logging), but the UI keeps showing "No
     records
     found" or a stuck loading spinner until some *unrelated* later interaction 
— a
     click,
     even just focusing a search box — happens to trigger a change-detection 
pass.
     
     ## Reproduction
     
     1. Open `/organization/offices` (or any affected list page) against a real
     backend
     2. Watch the network tab — the offices request completes successfully
     3. The table still shows "No records found"
     4. Click anywhere else on the page (a button, a search box, anything)
     5. The table now renders the data that was already loaded
    
   ## Root cause
   
     Not a zone-escape: `NgZone.isInAngularZone()` returns `true` inside the 
subscribe
     callback, and manually calling `ApplicationRef.tick()` after the 
assignment does
     **not** fix it either. Converting the property to an Angular **signal**
     (`signal<T[]>([])` + `.set()` in the callback + `foo()` in the template) 
reliably
     fixes it — signal writes notify Angular's scheduler through a different 
path than
     zone-triggered change detection, which this case falls through.
     
   
   
   


-- 
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]

Reply via email to