Skip to content

Commit

Permalink
Remove reference to defaultValue on relationship field (#6679)
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie authored Sep 29, 2021
1 parent c127ab7 commit 3ae9031
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions docs/pages/docs/apis/fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -482,10 +482,6 @@ Read our [relationships guide](../guides/relationships) for details on Keystone

- `ref` (required): A string of the form `<listKey>` or `<listKey>.<fieldKey>`.
- `many` (default: `false`): Configures the cardinality of the relationship.
- `defaultValue` (default: `undefined`): Can be either a relationship input value `{ connect: { id: ID } }` or an async function which takes an argument `({ context, originalInput })` and returns a relationship input value.
This value will be used for the field when creating items if no explicit value is set.
`context` is a [`KeystoneContext`](./context) object.
`originalInput` is an object containing the data passed in to the `create` mutation.
- `ui` (default: `{ hideCreate: false, displayMode: 'select' }`): Configures the display mode of the field in the Admin UI.
- `hideCreate` (default: `false`). If `true`, the "Create related item" button is not shown in the item view.
- `displayMode` (default: `'select'`): Controls the mode used to display the field in the item view. The mode `'select'` displays related items in a select component, while `'cards'` displays the related items in a card layout. Each display mode supports further configuration.
Expand All @@ -511,7 +507,6 @@ export default config({
fieldName: relationship({
ref: '...',
many: false,
defaultValue: '...',
ui: {
hideCreate: false,
// Display mode: 'select'
Expand Down

1 comment on commit 3ae9031

@vercel
Copy link

@vercel vercel bot commented on 3ae9031 Sep 29, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.