I'm retrieving posts using findAll (because it auto-updates when new posts are pushed to the store).
Therefore I'm doing the sorting in the controller using the SortableMixin. You can specify multiple sort-properties but the sort-direction for both properties are different. It would isPublished -> Ascending, createdAt -> Descending (Show drafts first, then the rest starting with the latest).
sortProperties: ['isPublished','createdAt'],
sortAscending: false
How can I make this work without sacrificing the auto-updating template?
Aucun commentaire:
Enregistrer un commentaire