rosnovsky / sanity-plugin-autocomplete-tags

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

[FEATURE] Allow different names than only "tags" #17

Open mdenchev-aiopsgroup opened 3 years ago

mdenchev-aiopsgroup commented 3 years ago

Is your feature request related to a problem? Please describe. I'd like to use this functionality in a bit more flexible way. Instead of using it for "tags", I want to use it to describe a document in a certain way. For example I want to describe my document with "Regions". However it seems that the autocomplete list only works if my field is named "tags".

Describe the solution you'd like I'd like the plugin to use the "name" property of the field instead of relying on a hardcoded "tags" name.

Describe alternatives you've considered I can continue using the plugin with the name "tags" but it messes up with the rest of the schema.

Additional context Allowing the use of different name than "tags" would allow multiple fields of type "tags" on the same document.

aaadotpm commented 3 years ago

This would be great! And is somewhat related to #12. Right now, it's possible to use a custom name, but as you point out, the autocomplete will not work. #12 suggests defining which path in the document the plugin should base the autocomplete on.

crankymaracuja commented 3 years ago

I would love this feature too!

In my case I have tags and skills that could work with autocompletion. An author can have tags and skills whereas articles only have tags. My idea is to bind the autocompletion to the name of this array field. Like, tags autocompletes with all tags through the project and skills autocompletes with all skills throughout the project.

Would love that!

rosnovsky commented 2 years ago

Sorry folks, it's been a rough few months. I'm on it now :) Thank you for your patience!