Closed DotFivePin closed 3 years ago
Could you provide array
that you're trying to sort?
This is how its coming back to me. Is this what you meant?
{
"notes":[
{
"timestamp":1489002240,
"message":"message here",
"user":"57ea"
},
{
"timestamp":1489068169,
"message":"message here",
"user":"57ea"
},
{
"timestamp":1489068388,
"message":"message here",
"user":"57ea"
},
{
"timestamp":1489069644,
"message":"message here",
"user":"57ea"
},
{
"timestamp":1489084233,
"message":"message here",
"user":"57ea"
},
{
"timestamp":1489155705,
"message":"message here",
"user":"57ea"
},
{
"timestamp":1489155718,
"message":"message here",
"user":"57ea"
},
{
"timestamp":1489164617,
"message":"message here",
"user":"57ea"
},
{
"timestamp":1489411959,
"message":"message here",
"user":"57ea"
},
{
"timestamp":1489412001,
"message":"message here",
"user":"57ea"
},
{
"timestamp":1489415015,
"message":"message here",
"user":"57ea"
}
]
}
It almost seems as if it doesn't sort properly for me if there are a lot of entries in the array. If that makes sense.
I have an identical array that only has 4 things in it, and that one sorts fine.
Update?
i've tried to reproduce your issue. but i couldn't get the same behaviour you get. Could you check whether you're doing some modifications on those items, so that it forces to re-order everything again?
@DotFivePin Could you try this issue with 2.0.0
? Do you still have this problem?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have a date coming back in Long form. Like "1489069644" which is equal to "Thursday, March 9, 2017 2:27:24 PM" if converted.
When I sort on this, it gets stuck and is constantly trying to sort and resort in random orders. <div *ngFor="let note of detailsList?.notes | orderBy: 'note.timestamp'">
I am using this sort in other places, but never had an issue like this before. Do you know why its behaving this way?
These images were captured seconds apart. Its just constantly changing. (I am converting them when displaying) '{{note?.timestamp * 1000 | date:'MM/dd/yyyy hh:mm a'}}'