feed icon indicating copy to clipboard operation
feed copied to clipboard

Feed items added asynchronously are not sorted by date

Open ruzz311 opened this issue 10 years ago • 1 comments

If my recordset is not sorted by descending date my feed is out of order. It would be nice if there was a sort before the render.

I noticed this behavior this when I added items to the feed from multiple async sources.

ruzz311 avatar Apr 09 '15 20:04 ruzz311

FWIW it's easy to add this yourself before render:

feed.items.sort((a, b) => b.date - a.date)

will do a reverse sort (newest to oldest). I could see potentially changing that sort if you had posts with an "original published date" and an "updated date" — perhaps you'd want to bubble the newly updated posts to the top.

WestonThayer avatar Feb 11 '19 21:02 WestonThayer