TreeTable: emptymessage doesn't display
Describe the bug
The empty message doesn't display in the TreeTable component. We can easily reproduce the bug as it is visible on the PimeNG doc on the filter example: it should display an empty message but it doesn't. https://primeng.org/treetable#filter
I notice that if I use the old template syntax pTemplate="emptymessage" it is working, but the message doesn't display with the new syntax "#emptymessage" (that is used on the primeNG doc and the example as well).
We can also notice that the bug is only on TreeTable component, the emptymessage is well displayed on the Table component.
Pull Request Link
No response
Reason for not contributing a PR
- [ ] Lack of time
- [x] Unsure how to implement the fix/feature
- [ ] Difficulty understanding the codebase
- [ ] Other
Other Reason
No response
Reproducer
https://stackblitz.com/edit/stackblitz-starters-ngdxrarj?file=src%2Ftree-table-demo.html
Environment
Mac OS 15.7.1 / Chrome 142.0.7444.176
Angular version
20.0.3
PrimeNG version
v20
Node version
22.13.1
Browser(s)
Chrome latest
Steps to reproduce the behavior
- Go to a treetable with filters
- Set filters to get no results
- The emptymessage defined in the template is not displayed
Expected behavior
The message defined in ng-template #emptymessage should display if no results
<ng-template #emptymessage>
<tr>
<td [attr.colspan]="cols.length">No data found.</td>
</tr>
</ng-template>
Confirmed on PrimeNG v19.1.3 as well.