Closed jmaynier closed 10 years ago
Yes, that was by design (I didn't need anything more complicated than a direct property), but parsing an expression would have greater utility. I will think of an appropriate expression syntax and implement it.
I added an additional attribute to the sortable-header directive to support this. You can add 'on' with an expression as the value, such as:
on="birth.date" on="birth.date | date:'yyyy'"
See an example here: http://jsfiddle.net/6mXt5/4/
Thanks for the quick fix !
Only direct properties are supported for sortable headers, we have to create a comparator function for every nested property.
Example: with a collection containing nested objects like: [{name:"ABC", birth:{date:'2000-01-01", place:"NY"}}, {name:"XYZ", birth:{date:'2010-01-01", place:"Spain"}}]
will not work. The code should parse the col attribute for dot.