🔮 Sanity Create is here. Writing is reinvented. Try now, no developer setup

Sanity plugin discussion on adding filter option to orderable document list

11 replies
Last updated: May 31, 2022
Hello
user T
!
I was using and testing your
@sanity/orderable-document-list. Is the Sanity team planning to add the filter option to the options list?
That would be extremely helpful, our clients are asking for this feature.
May 11, 2022, 12:48 PM
I think that the best way to do these things for now is with Custom Inputs, since you have full flexibility.
May 11, 2022, 1:36 PM
Hey!
That would be useful – but I haven’t fully considered the impacts of setting orders for documents when some documents have been filtered out? It’s currently “safer” to show all documents since the order is established across the entire
_type
, not a filtered subset of the
_type
May 11, 2022, 2:24 PM
I understand. I think that filtering is useful when you have i18n in place.For instance, I have document of type page that are localized, and I would like to show the pages that are in the base language. Currently, I would see all the pages.
I understand that this is a specific use case, we use Sanity as CMS for our websites and displaying all the pages in all locales might be overwhelming for our clients.
May 11, 2022, 3:40 PM
Ah. Now that is interesting.
May 11, 2022, 3:53 PM
Yes, If I can help you with any information please let me know. We use Sanity intensively and we would be really happy to contribute on this.
May 12, 2022, 6:22 AM
Have been involved a bit in our i18n efforts of late and think it's a perfect use case.
You could put together a PR if you're feeling ambitious, otherwise I'll add it to my todo list
😄
May 12, 2022, 7:19 AM
You got it! I’ll do my best, but I think I won’t have any company time for this PR. I would be extremely happy to review or test it though.I’ll keep an eye on the repo then
😉
May 12, 2022, 7:58 AM
Thanks to
user M
you can now add a
filter
in
0.0.9
🎉

https://www.npmjs.com/package/@sanity/orderable-document-list
May 27, 2022, 9:44 AM
I’ll test it right away User, in the next days I will give it a shot 🙂 Looking forward to testing it!
May 30, 2022, 6:45 AM
I’ve implemented everything as reported on the readme file, and it works like a charm 🙂
May 31, 2022, 7:39 AM
Some feedbacks after some hours of usage:• when I delete an element, I still get the element on the list with title “Untitled”
• If I create a new element, it’s not shown on the list
In both case, I have to reload the page to see the changes
May 31, 2022, 9:51 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?