Skip to content

Issue with search SortΒ #1712

@Eldad7

Description

@Eldad7

Hey,

You can't use Sort properly when using Typescript
In order for this:
sort: [ { createdDate: { order: "Desc", } } ]

To work - you must mark the entire query with "as any".
This is due to the fact that the "sort" types on the file lib/api/types.d.ts is marked as string | string[]. And though it's working for "ASC" sorting, if you need "desc" you have to make some sort of override like this.

I'm using version: 8.2.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions