I am trying to get the mat-table sorting to work locally, and while I can get the data to show up as expected, clicking on the header row does not do the sortin
For anyone that is confused about these namings having to be equal, I did some testing:
This will work (the name of the property is the same as the column def):
Version
{{element.version}}
displayedColumns: string[] = ['version']
This will NOT work (the name of the property is not the same as the column def):
Version
{{element.version}}
displayedColumns: string[] = ['version2']
Fyi, this also does NOT work (the length of a property):
Version
{{element.ids.length}}
displayedColumns: string[] = ['length']
And neither does this:
Version
{{element.ids.length}}
displayedColumns: string[] = ['ids.length']