Skip to content

Commit

Permalink
chore(core): add debug schema for virtualization bug (#5017)
Browse files Browse the repository at this point in the history
  • Loading branch information
binoy14 authored Oct 20, 2023
1 parent 744bfdf commit 2f3e763
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions dev/test-studio/schema/debug/virtualizationDebug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,5 +332,63 @@ export const virtualizationDebug = defineType({
}),
],
}),

defineField({
type: 'array',
name: 'modalTest',
title: 'Modal Test',
of: [
{
type: 'object',
name: 'modalTestObject',
title: 'Modal Test Object',
fields: [
{
type: 'string',
name: 'title',
title: 'Title',
},
{
name: 'arrayInObjectNestedGroup',
title: 'Array in Object Arrays',
type: 'object',
options: {
collapsible: true,
},
groups: [
{
name: 'nestedModalGroup',
title: 'Nested Modal Group',
},
],
fields: [
defineField({
name: 'arrayListNestedSingleGroup',
title: 'Array List single item in nested group',
type: 'array',
group: 'nestedModalGroup',
of: [
{
type: 'reference',
to: [{type: 'author'}],
},
],
initialValue: async (_, context) => {
const {getClient} = context
const client = getClient({apiVersion: '2022-12-07'})
const authors = await getAuthors(client, 8)

return authors.map((author: any) => ({
_type: 'reference',
_ref: author._id,
}))
},
}),
],
},
],
},
],
}),
],
})

2 comments on commit 2f3e763

@vercel
Copy link

@vercel vercel bot commented on 2f3e763 Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

performance-studio – ./

performance-studio-git-next.sanity.build
performance-studio.sanity.build

@vercel
Copy link

@vercel vercel bot commented on 2f3e763 Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

test-studio – ./

test-studio.sanity.build
test-studio-git-next.sanity.build

Please sign in to comment.