keystonejs / keystonejs/keystone

Child fields in objects (in arrays) do not render

Open
#8,682 0 comments 0 reactions 1 assignee Claimed by @dcousens View on GitHub
needs reproduction
Dominant language
TypeScript
Stars
10k
Forks
1.3k
Avg merge
19h 14m
Merged PRs (30d)
19

Description

## Reproduction
When adding child fields in an object field, they do not render. I'm using this in an array field as below, and am stumped as to how to edit the child field in question.
```
// ...other componentBlock definitions
faq: component({
preview: (props) => {
return (
[placeholder preview]
)
},
label: 'FAQ',
schema: {
title: fields.text({ label: 'Titel' }),
questions: fields.array(
fields.object({
question: fields.text({
label: 'Vraag'
}),
answer: fields.child({
kind: 'inline',
placeholder: 'Antwoord',
links: 'inherit'
})
}),
{
label: 'Vragen',
itemLabel: props => { return props.fields.question?.value || 'New item' }
}
)
}
}),
```

## Expectation
The child field to render within the popup of the array field's object field.

## For context
Node 18.14, recent versions of Chrome and Firefox.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.