Skip to content

fix(keystatic): allow scalar array fields in collection columns (#1548) - #1681

Open
MilindChatrabhuji wants to merge 1 commit into
Thinkmill:mainfrom
MilindChatrabhuji:fix/columns-array-field-1548
Open

MilindChatrabhuji wants to merge 1 commit into
Thinkmill:mainfrom
MilindChatrabhuji:fix/columns-array-field-1548

Conversation

@MilindChatrabhuji

Copy link
Copy Markdown
Contributor

Summary

Fixes #1548.

collection().columns type constraint previously only allowed scalar FormField and SlugFormField entries, rejecting fields.array(...) even though CollectionPage already parses array values via parseProps and renders them as val + ''.

Changes

  • Update columns in packages/keystatic/src/config.tsx to also accept scalar ArrayField entries (where the element field is a scalar FormField or SlugFormField), while continuing to reject complex object/content fields.
  • Add packages/keystatic/src/config.test.ts verifying both type-level acceptance/rejection (via tsc) and runtime parsing with parseProps.
  • Add a patch changeset for @keystatic/core.

Verification

  • ts-gql build, l10n.ts, build-prism.ts, and preconstruct build succeeded.
  • tsc --noEmit passed across the workspace with 0 errors.
  • eslint and prettier --check passed on changed files.
  • vitest run packages/keystatic/src/config.test.ts packages/keystatic/src/app/updating.test.tsx packages/keystatic/src/form/field-assertions.test.ts passed (3 test files, 15 tests).

@changeset-bot

changeset-bot Bot commented Nov 25, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 01cc2c4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@keystatic/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

collection().columns should allow array fields (runtime works, types reject them)

1 participant