Skip to content

fix: expose type for field's position#14390

Merged
PatrikKozak merged 3 commits into
payloadcms:mainfrom
bratvanov:field-admin-position-types-add-main
Apr 9, 2026
Merged

fix: expose type for field's position#14390
PatrikKozak merged 3 commits into
payloadcms:mainfrom
bratvanov:field-admin-position-types-add-main

Conversation

@bratvanov

@bratvanov bratvanov commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

Adds FieldPosition = 'main' | 'sidebar' and uses it in FieldAdmin and AdminClient, replacing the previous 'sidebar'-only type.

This is especially useful when overriding a plugin field's default position: 'sidebar' back to 'main', which already worked at runtime but failed type-checking.

Also updates the docs to list both options and exports FieldPosition from the package index.

@bratvanov bratvanov changed the title fix: expose field admin main position typing fix: expose type for field's position Nov 1, 2025
@PatrikKozak PatrikKozak self-assigned this Apr 2, 2026
@PatrikKozak PatrikKozak self-requested a review April 2, 2026 16:29
@PatrikKozak PatrikKozak enabled auto-merge (squash) April 9, 2026 17:55
@PatrikKozak PatrikKozak merged commit d9b3c07 into payloadcms:main Apr 9, 2026
165 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚀 This is included in version v3.83.0

milamer pushed a commit to milamer/payload that referenced this pull request Apr 20, 2026
Adds `FieldPosition = 'main' | 'sidebar'` and uses it in `FieldAdmin`
and `AdminClient,` replacing the previous `'sidebar'`-only type.

This is especially useful when overriding a plugin field's default
`position: 'sidebar'` back to `'main'`, which already worked at runtime
but failed type-checking.

Also updates the docs to list both options and exports `FieldPosition`
from the package index.

---------

Co-authored-by: Patrik Kozak <35232443+PatrikKozak@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants