primeng icon indicating copy to clipboard operation
primeng copied to clipboard

TurboTable. multi-column dataKey

Open zer013 opened this issue 8 years ago • 6 comments

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

Current behavior An element table with multiple key that needs the dataKey property to be able to use rowExpansion. DataKey does not work if I pass the name of the properties separated by dots. Turbo Table considers that the key is undefined

Expected behavior To be able to define a table with dataKey composed of more than one property

Minimal reproduction of the problem with instructions Define a TurboTable with rowExpansion, and dataKey composed with the name of two properties separated by a point.

Please tell us about your environment: Windows 10

Angular version: 2.0.X 5.0.0

PrimeNG version: 2.0.X 5.2.5

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 ]

Language: [all | TypeScript X.X | ES6/7 | ES5]

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

zer013 avatar Apr 27 '18 12:04 zer013

i am facing same issue

imashu92 avatar May 29 '18 08:05 imashu92

It looks like the support for child properties was removed from TurboTable (it worked in old DataTable). I have to do all the parsing myself now but I'm not using such properties as a key.

ctrl-brk avatar May 29 '18 16:05 ctrl-brk

dataKey is only a string so if you need multiple datekey, you can try that dataKey="param1-param2-param3", and after when you get datakey ,

let arrayDateKey = this.dataKey.split('-');

vZanchiV avatar Dec 12 '18 10:12 vZanchiV

Duplicate of #5383

cagataycivici avatar Dec 26 '18 13:12 cagataycivici

any solutions yet?

niran-manandhar avatar May 16 '19 07:05 niran-manandhar

<p-table ... dataKey="key1" dataKey="key2"> I use this way and it works fine :D

SarahShhaltough avatar Jul 13 '19 12:07 SarahShhaltough