Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defaultOrdering stopped working in sanity 3.59.0 #7586

Open
codeBelt opened this issue Oct 4, 2024 · 0 comments
Open

defaultOrdering stopped working in sanity 3.59.0 #7586

codeBelt opened this issue Oct 4, 2024 · 0 comments
Labels

Comments

@codeBelt
Copy link

codeBelt commented Oct 4, 2024

Describe the bug

defaultOrdering stopped sorting in "sanity": "3.59.0". Works fine in "sanity": "3.58.0".

To Reproduce

export function structure(S: StructureBuilder) {
  return S.list()
    .title('Content')
    .items([
      S.listItem()
        .title('Pages')
        .icon(FiFile)
        .child(
          S.documentList()
            .apiVersion(envClient.NEXT_PUBLIC_SANITY_API_VERSION)
            .title('Pages')
            .schemaType(PAGE_DOCUMENT_ID)
            .filter(`_type == "${PAGE_DOCUMENT_ID}"`)
            .defaultOrdering([
              {field: 'authRequired', direction: 'asc'},
              {field: 'title', direction: 'asc'},
            ])
        ),
    ]);
}

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Which versions of Sanity are you using?

@sanity/cli (global) 3.56.0 (latest: 3.59.0)
@sanity/image-url 1.0.2 (up to date)
@sanity/ui 2.8.9 (up to date)
@sanity/vision 3.59.0 (up to date)
sanity 3.59.0 (up to date)

What operating system are you using?

macOS 14.6.1

Which versions of Node.js / npm are you running?

10.5.0
v21.7.2

@linear linear bot added the bug label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant