primefaces / primefaces/primeng

Table Error NG0100: When using table with header template and rowGroupMode="subheader"

Open
#19,084 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Resolution: Stale Status: Needs Triage
Dominant language
TypeScript
Stars
12.5k
Forks
5.1k
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When using table with header-template and rowGroupMode="subheader" an ExpressionChangedAfterItHasBeenCheckedError occurs when the component is created.

It also depends on the content in the header ng-template. Using any (i tried a few) angular-Component seemed to cause the error. But swapping the content of the template with simple html-tags didn't seem to cause the error.
trace:

 ERROR RuntimeError: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value for 'top': '18px'. Current value: '36px'. Expression location: _AppComponent component. Find more at https://angular.dev/errors/NG0100
    at throwErrorIfNoChangesMode (chunk-XHMSWZZK.js?v=f495da85:9628:9)
    at bindingUpdated (chunk-XHMSWZZK.js?v=f495da85:13976:9)
    at checkStylingProperty (chunk-XHMSWZZK.js?v=f495da85:22157:30)
    at ɵɵstyleProp (chunk-XHMSWZZK.js?v=f495da85:22127:3)
    at RowGroupHeader_HostBindings (primeng_table.js?v=7bc689de:11993:9)
    at processHostBindingOpCodes (chunk-XHMSWZZK.js?v=f495da85:11509:9)
    at refreshView (chunk-XHMSWZZK.js?v=f495da85:11343:5)
    at detectChangesInView (chunk-XHMSWZZK.js?v=f495da85:11459:5)
    at detectChangesInViewIfAttached (chunk-XHMSWZZK.js?v=f495da85:11442:3)
    at detectChangesInEmbeddedViews (chunk-XHMSWZZK.js?v=f495da85:11412:7)
Pull Request Link

No response

Reason for not contributing a PR
  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other
Other Reason

No response

Reproducer

https://stackblitz.com/edit/github-3nxelogu?file=src%2Fapp%2Fapp.component.html

Environment

It is reproducable with the current stackblitz template. I currently use angular 20.2 with primeng 20.3.0 in my project

Angular version

^20

PrimeNG version

v20

Node version

22 LTS

Browser(s)

only tested in Chrome

Steps to reproduce the behavior
  1. Open the Stackbliz example
  2. Open dev tools to view error
Expected behavior

Should not cause a ExpressionChangedAfterItHasBeenCheckedError when beeing created

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked StackBlitz reproducer using Angular 20 and PrimeNG 20.3.0, then inspect the table implementation for rowGroupMode="subheader" and header templates, especially the RowGroupHeader host binding shown in the trace. Reproduce the creation-time error and verify that the table renders without NG0100 while preserving the reported grouping behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.