-
Notifications
You must be signed in to change notification settings - Fork 156
Closed
Description
I have an ElectricCollection which loads tasks that have an inserted_at date field.
I'm parsing this when I sync the data:
const parser = {
timestamp: (date: string) => new Date(date)
}This is working, I see the date object in the collection data.
When I query it:
const { data } = useLiveQuery(query => (
query
.from({ taskCollection })
.select('@id', '@title', '@inserted_at')
.orderBy({'@inserted_at': 'desc'})
.keyBy('@id')
))- I get the string version of the field back from the query
- the orderBy doesn't work
The latter is confusing -- because I believe it was working and then stopped working. OrderBy works if I sort on another field. But not for inserted_at.
Metadata
Metadata
Assignees
Labels
No labels