Closed DancingDad closed 6 years ago
Hi @DancingDad uhm, that's weird, could you show your code? Bear in mind that sortyBy
value should be equal to the property
value of your column.
If this is not helpful yet, can you replicate this using StackBlitz? You can use this a starter.
Hi @brunano21 ,
Thanks for the quick response!
Yes, the property and the sortBy are the same. In this case: [sortBy]="'title'" [property]="'title'"
However, the table does not want to show as sorted by said column on navigation to the page. Your "starter" version on StackBlitz works as expected once the above values have been included. This clearly points to something erroneous in my code. I will keep checking my code and let you know.
Thanks again.
@DancingDad Ok, I'll close this. But feel free to reopen it if you still don't figure it.
Hi,
Adding the data-table parameters: [sortBy]="'column-name'"
[sortAsc]="true"
Sets the column and the sort arrow, but does not sort the rows in the table. Manually clicking on the sort arrows in the table sorts the rows (either ascending/descending), but not by default using these parameters. Am I not doing something incorrectly or is this an issue?
Great component by the way!