Primeng: TreeTable header template showing on every row

Created on 5 Feb 2018  路  3Comments  路  Source: primefaces/primeng

There is no guarantee in receiving an immediate response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeNG PRO Support where support is provided within 4 business hours

I'm submitting a ... (check one with "x")

[X] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Plunkr Case (Bug Reports)

https://plnkr.co/edit/obGyizLd6mrplqmwVOuY?p=preview

Current behavior
After upgrading from 5.0.0 rc1 to 5.2.0 TreeTable columns with header template and content template show the header template on every row and do not show the content template. If I remove the ng-template for the header the content template shows as expected

Expected behavior
Header template would show only in the header and the content template would show in each row.

Minimal reproduction of the problem with instructions
upgrade to 5.2.0 of primeng. problem was not there in earlier version

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

OS: Windows
IDE: VS Code
PM: NPM
HTTP: Node

  • Angular version: 5.2.3

  • PrimeNG version: 5.2.X

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

    tested on chrome, firefox

  • Language: [all | TypeScript 2.6 | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

Most helpful comment

a workaround seems to be: change the order of the ng-templates.
insetad of:

<ng-template let-col pTemplate="header">
..
</ng-template>
<ng-template  let-col pTemplate="body">
....
</ng-template>

use:

<ng-template  let-col pTemplate="body">
....
</ng-template>
<ng-template let-col pTemplate="header">
..
</ng-template>

All 3 comments

We have the same issue with 5.2.0

a workaround seems to be: change the order of the ng-templates.
insetad of:

<ng-template let-col pTemplate="header">
..
</ng-template>
<ng-template  let-col pTemplate="body">
....
</ng-template>

use:

<ng-template  let-col pTemplate="body">
....
</ng-template>
<ng-template let-col pTemplate="header">
..
</ng-template>

As TreeTable will be reimplemented in upcoming 6.0, closing this issue.

Was this page helpful?
0 / 5 - 0 ratings