Feature request: Extend options for Relationship or Select fields (support async/dynamic options) #14265
dev387
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Currently, both
relationshipandselectfields in Payload CMS rely on static options or on existingrelationTocollections.However, in many real-world cases — especially in multi-tenant or dynamic systems — it would be extremely useful if these options could be asynchronous or dynamically generated, e.g. from an API, user context, or runtime data.
Example use cases
Proposed enhancement
Add support for async or dynamic options for:
selectfields (admin.optionscould accept a function returning a Promise)relationshipfields (via an optionalloadOptionscallback or similar mechanism)Benefits
Example scenarios
"All Tenants"alongside database-driven onesQuestion
Would the Payload team be open to adding async/dynamic support for
options(or aloadOptionscallback) forselectand/orrelationshipfields in the admin UI?Beta Was this translation helpful? Give feedback.
All reactions