Draft: Add optionsSource support for dynamic list field options#280
Draft: Add optionsSource support for dynamic list field options#280nuzil wants to merge 2 commits intoadobe:mainfrom
Conversation
- Extended fields.ts schema to support optionsSource property with action/url - Made options property optional when optionsSource is provided - Updated get-config-schema template to resolve dynamic options at runtime
|
|
Hi @nuzil, I really like the direction of this PR! The implementation is solid. Just a couple of thoughts for future-proofing: Stale Configs: What happens if a config option is saved but then removed from the action later? It might be worth considering how we handle those 'orphaned' values. Template Logic: The template is getting quite large; moving some of the logic into a testable helper function could be a great next step to keep things maintainable. Not blockers for now, but definitely worth a thought as we scale this out. |
Add Dynamic Options Support for List Fields (
optionsSource)Summary
This PR adds support for dynamically loading options for
listtype fields in the Adobe Commerce App Management configuration schema. Instead of requiring static options defined at build time, fields can now specify anoptionsSourcethat references a runtime action or external URL to fetch options dynamically.Configuration Example
Action