The AttioRecordCombobox API is experimental and may change in the future. It has been marked as @deprecated to remind the developer that it is experimental. It is not "deprecated", just experimental. Please don't use it in production versions of your app. We do not guarantee backward compatibility, or that the API will remain stable.
This component is returned by useForm().

Example

record-form.tsx
import React from "react"
import {Forms, useForm, showToast} from "attio/client"

export function RecordForm() {
  const {Form, SubmitButton, Experimental_AttioRecordCombobox} = useForm(
    {
      person: Forms.attioRecord().objectSlug("people"),
      company: Forms.attioRecord().objectSlug("companies"),
      record: Forms.attioRecord(),
    },
    {}
  )
  return (
    <Form
      onSubmit={async (values) => {
        await showToast({
          title: "Form submitted",
          variant: "success",
          text: `Selected person: ${values.person?.recordId} (${values.person?.objectSlug}), company: ${values.company?.recordId} (${values.company?.objectSlug}), record: ${values.record?.recordId} (${values.record?.objectSlug})`,
        })
      }}
    >
      <Experimental_AttioRecordCombobox label="Person" name="person" objectSlug="people" />
      <Experimental_AttioRecordCombobox label="Company" name="company" objectSlug="companies" />
      <Experimental_AttioRecordCombobox label="Record" name="record" />
      <SubmitButton label="Submit" />
    </Form>
  )
}

Props

label
string
required
The label of the Attio record combobox input field.
name
string
required
The path to the attioRecord value of the input field in your form schema. e.g. "company", "appointment.contact_person"
objectSlug
ObjectSlug | Array<ObjectSlug>
Specifies which type(s) of records to load in the combobox, including custom objects.Defaults to ["companies", "people", "deals", "users"].
disabled
boolean
Whether or not the field should be disabled.Defaults to false (not disabled).