Content block

Grouped checklist

Selectable field groups with facts, disabled reasons, count, and search.

Copy the bindings from
app/features/animals/routes/dashboard/animals/components/bulk-group-list.tsx
Route
/dashboard/accounts/:acctId/sites/:siteId/animals
Empty

No fields available.

Printed props
<Form
  validator={{
    validate: validate,
  }}
  onSubmit={onSubmit}
>
  <GroupedChecklist
    groups={[]}
    chosen={[]}
    onToggle={onToggle}
  />
</Form>
One

Primary information

Printed props
<Form
  validator={{
    validate: validate,
  }}
  onSubmit={onSubmit}
>
  <GroupedChecklist
    groups={[
      {
        heading: 'Primary information',
        items: [
          {
            id: 'gender',
            label: 'Gender',
          },
        ],
      },
    ]}
    chosen={[
      'gender',
    ]}
    onToggle={onToggle}
  />
</Form>
Groups, search, count and disabled reasons

Fields11

Primary information

Adoption and Listing

Documents

Printed props
<Form
  validator={{
    validate: validate,
  }}
  onSubmit={onSubmit}
>
  <GroupedChecklist
    groups={[
      {
        heading: 'Primary information',
        items: [
          {
            id: 'name',
            label: 'Name',
          },
          {
            id: 'gender',
            label: 'Gender',
          },
          {
            id: 'breed',
            label: 'Breeds',
          },
          {
            id: 'dob',
            label: 'Date of Birth',
          },
          {
            id: 'location',
            label: 'Location and Volunteer',
          },
          {
            id: 'siblings',
            label: 'Mark as siblings',
            reason: 'Select at least two animals.',
            isDisabled: true,
          },
        ],
      },
      {
        heading: 'Adoption and Listing',
        items: [
          {
            id: 'fee',
            label: 'Fee',
          },
          {
            id: 'tags',
            label: 'Tags',
          },
          {
            id: 'display',
            label: 'Public display settings',
          },
          {
            id: 'application',
            label: 'Application settings',
          },
        ],
      },
      {
        heading: 'Documents',
        items: [
          {
            id: 'document',
            label: 'Attach a document',
          },
        ],
      },
    ]}
    chosen={[
      'gender',
    ]}
    onToggle={onToggle}
  />
</Form>
Disabled by a notice above the list

Finalize adoption can't be combined with other changes. Uncheck it to choose something else.

Adoption and Listing

Printed props
<Form
  validator={{
    validate: validate,
  }}
  onSubmit={onSubmit}
>
  <div
    className="flex flex-col gap-4"
  >
    <div
      id="checklist-notice"
      role="status"
    >
      <Alert
        variant="info"
      >
        Finalize adoption can't be combined with other changes. Uncheck it to choose something else.
      </Alert>
    </div>
    <GroupedChecklist
      disabledDescriptionId="checklist-notice"
      groups={[
        {
          heading: 'Adoption and Listing',
          items: [
            {
              id: 'finalize',
              label: 'Finalize adoption',
            },
            {
              id: 'fee',
              label: 'Fee',
              isDisabled: true,
            },
            {
              id: 'tags',
              label: 'Tags',
              isDisabled: true,
            },
          ],
        },
      ]}
      chosen={[
        'finalize',
      ]}
      onToggle={onToggle}
    />
  </div>
</Form>