Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

link field's appearance select bug #19

@zanami

Description

@zanami

I guess there's a small bug in fields/link.ts

    linkResult.fields.push({
      name: 'appearance',
      type: 'select',
      defaultValue: 'default',
      options: appearanceOptionsToUse,
      admin: {
        description: 'Choose how the link should be rendered.'
      }
    });

SelectInput throws "TypeError: undefined is not an object (evaluating 'matchingOption.label')" if 'default' is not in appearanceOptionsToUse around here probably.

There's a place in fields/hero.ts

    linkGroup({
      appearances: ["primary", "secondary"], // no "default" = TypeError
      overrides: {
        name: "buttons",
        label: "Buttons",
        maxRows: 2,
        admin: {
          condition: (_, { type }) => type === "home",
        },
      },
    }),

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions