Skip to content

Selecting A Subset of Fields in an embedded Array #1151

Answered by radekmie
MDrooker asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @MDrooker. Unfortunately, it's not possible right now. You can use $ as "any index", but it won't let you group the fields whatsoever. The best I can think of right now, would be to do something like this:

<AutoForm {...}>
  <AutoFields fields={['a', 'b']} />
  <ListField name="c">
    <ListItemField name="$">
      <AutoFields fields={['x', 'y']} />
    </ListItemField>
  </ListField>
  <AutoFields fields={['d', 'e']} />
</AutoForm>

(That's just a sketch; the exact structure depends on your schema.)


Another option would be to create a subschema (a schema with a subset of fields), only for this form. It may be easier, depending on your case.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by radekmie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants