Additional dynamic filter on array field with references #3739
Unanswered
lotarbo
asked this question in
Sanity Studio Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. I want filter references in array field, based on field in same object. My document have structure( page(document)->preset(oject)->components) in component field i have many objects. One object has this structure - {category(reference), items(array of reference)}. So i want filter items based on category selection using this https://www.sanity.io/docs/reference-type#8118f73f6758 . The main problem - i cant pick same object. First i need to know _key of this object using parentPath then i need found my object by this _key inside document
And it looks like this. Mb there are better way to do this?
Also this doesnt work like dynamic filter. When i change category filed, i need to refresh page to see new filtered projects on projects field
This how my field looks like
this video describes what i mean)
PS: sortable doesn't work too(
Screen.Recording.2022-10-07.at.13.57.39.mov
Beta Was this translation helpful? Give feedback.
All reactions