irossimoline / angular4-material-table

Angular 4 table based on @angular/cdk table structure, to allow row insertion, edition, validation and deletion.
MIT License
55 stars 25 forks source link

Nested Properties for sortingDataAccessor #59

Closed dwbartz closed 3 years ago

dwbartz commented 3 years ago

Due to some inflexibility in the data I was using I was investigating a way to bind mat-sort-header to a nested property in the data structure. I ended up writing a custom function to replace the sortingDataAccessor in MatTableDataSource in order to facilitate this. It's written in a generic way so I was thinking I'd get some feedback on the idea first and then create a PR for the change if it sounds helpful.