setFields

setFields

Add, update, or remove Collection fields.

await collection.setFields([
  {
    id: "1",
    type: "string",
    name: "Name"
  },
  {
    id: "2",
    type: "number",
    name: "Age"
  },
])

Parameters

  • fields: EditableManagedCollectionField[] – The array of fields that should be used for the collection

Returns

  • Promise<void>