I'm submitting a ... (check one with "x")
[ ] bug report => Search github for a similar issue or PR before submitting
[x] 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)
Update: Here is a Plunk:
http://plnkr.co/edit/bwYCaCg99dRSVsCp8EQi?p=preview
Current behavior
According to the documentation, the correct way to get dynamic columns for TurboTable is to use {{rowData[col.field]}}. The problem is, "field" can be multi-part, e.g., "problems.leakage", meaning each row object contains a sub-object that has the desired property. There was no problem doing this with p-dataTable; you just had to do [field]="col.field".
But the bracket notation property accessor, meaning rowData[col.field], doesn't work when the field string is multipart.
The way this worked with p-dataTable was with a function in PrimeNG's ObjectUtils called resolveFieldData(). I copied this method into my component, then replaced {{rowData[col.field]}} with {{resolveFieldData(rowData, col.field)}}.
Expected behavior
It seems like either there should be some kind of built-in way for this to work, as with p-dataTable, or else this should be part of the documentation, since I assume this will be a common problem.
Thank you for your time...
Please tell us about your environment:
Windows 10
Angular version: 5.0.0
PrimeNG version: 5.2.0-rc.2
Browser: [Chrome 63 | Firefox 57]
This is by design, you have full control over the presentation so it is up to you, Table just gives you the metadata, it is in your control on how to display it. Image you are doing a list with *ngFor with this case, how would you display nested fields? Same applies here as well. Probably a helper in your project to resolve fields similar to ObjectUtils.resolveFieldData in PrimeNG.
Thanks very much for the tip about resolveFieldData() ! The TurboTable documentation would benefit from mentioning this. It's essential for using the TurboTable with libraries like BreezeJS that return complex object graphs.
Most helpful comment
Thanks very much for the tip about resolveFieldData() ! The TurboTable documentation would benefit from mentioning this. It's essential for using the TurboTable with libraries like BreezeJS that return complex object graphs.