keystatic icon indicating copy to clipboard operation
keystatic copied to clipboard

allow `defaultValue` on `relationship` and `multiRelationship` fields

Open stefanprobst opened this issue 1 year ago • 0 comments

it would be great to be able to add a defaultValue to relationship and multiRelationship fields, i.e.:

categories: fields.multiRelationship({
  label: "Categories",
  collection: "categories",
  validation: { length: { min: 1 } },
  defaultValue: ["something"],
}),
source: fields.relationship({
  label: "Source",
  collection: "sources",
  validation: { isRequired: true },
  defaultValue: "something",
}),

stefanprobst avatar Jul 22 '24 09:07 stefanprobst