I have run into a similar problem to #1642 where there is a max call stack error when there are too many oneOf
options.
My initial thought was that I could use the getOptionLabel
and getOptionKey
in the AutoComplete
component to render the proper label when I pass in options in an enum with value and label specified. My options
are being passed by a custom renderer as follows:
const enumOptions = props.schema.enum?.map((enumOption: {label: string, value: any}) => {
return {label: enumOption.label, value: enumOption.value} as EnumOption;
});
Unfortunately, I run into the AJV error of “must be equal to one of the allowed values” because the options are objects (EnumOption
) and the value is a string (the option key). Is there a way to make this possible? I saw the reference to using i18n for translation of the values, but would that work with a list of enum options that could not be hardcoded (dynamically pulled from the services)?