Closed iway1 closed 1 year ago
Alternatively, might remove the enum values feature altogether. Seems to be causing a lot of confusion and may be a footgun, even though it sounds really cool on paper.
Anything that's doable with an enum is doable with a string field, and with string fields there's no need for an expanded API and it covers varied use cases more easily (IE fetching dynamic drop down values from server is impossible via enum, and it's clunky to have both enums and strings map to a component).
wait could you explain more about this decision? i would definitely want to define the possible options in the schema not in the component usage..
Same situation here. We have a lot of enums in codebase so it seems that the alternative would be to manually pass their options over when rendering a form?
Right now it isn't possible to have a unique enum field that works in any useful way.
I think the only way to implement this would be creating a new function specifically for creating unique enum fields, something like:
Needs to be able to pass in options at the form level and only be passed to the mapping once per field component type.