Open JustAnotherSoftwareDeveloper opened 6 years ago
Nested properties used for column prop
s are also not supported by summary rows.
Hey guys! How is going? Maybe you can merge a PR for this issue, because it is a really nasty situation when you work with complicated data and you have to group it by nesting props.
I'm submitting a ... (check one with "x")
Current behavior When using the [groupRowsBy] property, there are two issues 1) There is no supported use of nested properties 2) Due to the way JS maps work (by reference), using objects to group rows does not work
Expected behavior
[groupRowsBy] supports nested property in the same way the "prop" column does. Fortunately, you already have a method here https://github.com/swimlane/ngx-datatable/blob/master/src/utils/column-prop-getters.ts that does what you need. All that needs to be done is to refactor this to be more accessible, and call it when you're setting group array rows.
Reproduction of the problem
Unfortunately, the code sample template does not seem to be working. However, I'd be happy to answer any questions below
What is the motivation / use case for changing the behavior?
I want to group rows by a nested property. **Please tell us about your environment:**OS: Ubuntu 16.04 IDE: VSCode Package Manager: NPM
Table version: 13.0.1
Angular version: 5
Browser: [all ]
Language: [all TypeScript 2.7.1| ES6/7]