sanity
sanity copied to clipboard
Allow dynamic `options.list` for String type schema
Is your feature request related to a problem? Please describe. I want to create dynamic fields based on other fields. I need some behaviour like filter in references. There is built-in list for String schema which is fine, but I need the list to be dynamic, based on other field. The biggest use case for me is when I'm putting in an address and have country and region fields. The available regions is dependent on which country I pick.
Describe the solution you'd like Implement
type StaticList = Array<string> | Array<{title: string; value: string}>
type StringOptionsList = StaticList | (docOptions) => StaticList
Describe alternatives you've considered Nothing else really solves what I wanted
This is essentially a copy of #2821, which was autoclosed.