
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeGood news! The Sanity team has already added the filter option to the @sanity/orderable-document-list plugin. Based on the GitHub repository, this feature is now available and documented.
You can add a filter parameter when configuring the orderable document list in your Desk Structure. Here's how to use it:
orderableDocumentListDeskItem({
type: 'project',
title: 'Projects',
// Add your filter here
filter: `__i18n_lang == $lang`,
params: {
lang: 'en_US',
},
S,
context,
})The filter works with GROQ query syntax and accepts parameters through the params option. This is particularly useful for scenarios like:
Important caveat to be aware of: While the filter controls which documents are displayed in the list, the order ranks are still computed based on all documents of that type. As noted in the README:
However, order ranks are still computed based on all documents of the same
type. Creating multiple lists with differentfiltersettings could produce unexpected results.
So if you create multiple orderable lists with different filters for the same document type, you might see unexpected ordering behavior since they're all sharing the same orderRank field values.
The feature is available in the current version of the plugin, so make sure you're running an up-to-date version to access this functionality. You can check the releases page for version history.
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store