sanity
sanity copied to clipboard
Reference fields in arrays can't be sorted in Sanity Studio v3.
Hello,
I found a bug in Sanity Studio v3, references inside of arrays can’t be sorted, the UI is missing and drag isn’t working.
As you can see in the screenshot, this is working for the object field but not for the reference.
To Reproduce
Here is the schema i'm using :
defineField({
type: 'array',
group: 'main',
sortable: true,
name: 'children',
title: 'Children',
of: [
defineField({
name: 'collection',
title: 'Collection',
type: 'reference',
to: [{ type: 'collection' }]
}),
defineField({
name: 'link',
title: 'Link',
icon: FiLink,
type: 'object',
fields: ['...']
})
]
})
Expected behavior
The reference entry should be draggable.
Screenshots

Which versions of Sanity are you using?
Run sanity versions
in the terminal and copy-paste the result here.
What operating system are you using?
Mac OS 12.2
Which versions of Node.js / npm are you running?
8.1.2 v16.13.2
Thank you very much !
Thanks for reporting! We're on it :)
Yep got the same thing over here just as described by @JonasFolletete
I'm also facing this issue. I initially searched for the dialog message that appears when trying to drag and drop a reference to reorder the array: Can't upload any of these files here
- now perhaps people facing the same problem will find their way to this issue.
any ideas how to hotfix this for the moment ?
We just ran into this issue earlier today, I think this applies for any array of objects within a modal.
This is fixed in the latest RC. Thanks for reporting!