rosnovsky / sanity-plugin-autocomplete-tags

Creatable autocomplete tag dropdown input fields for Sanity Studio 🤓
MIT License
24 stars 7 forks source link

Optimize fetch tags query #26

Closed plsrd closed 2 years ago

plsrd commented 2 years ago

Since my last commit updates the client to use the latest version of the API, we can leverage some of GROQ's features to make the initial query return a flat array of tags.

plsrd commented 2 years ago

Oh, and apologies if there's anything wrong with my formatting here! This is my, like, second pull request to a project that isn't mine 😸

rosnovsky commented 2 years ago

Thank you! This is so much more elegant! Let me quickly test it on some of my weird edge cases, and let's merge this beauty!

As for the formatting, it's all good :))

rosnovsky commented 2 years ago

Thanks again for your contribution, @rlpennell!

I'll make a few minor updates and release it right away!