Default value is not getting populated on multiselect in react

Hi I am using jsonforms 3.0.0
Default value is not getting populated on dropdown and multiselect.

jsonSchema = {
type: “array”,
description: “description”,
items: {
type: “string”,
enum: [“a”,“b”],
default: “c”
},
minItems: 1
};
//////
const handleDefaultsAjv = createAjv({ useDefaults: true });
///
<JsonForms
schema={schema}
uischema={uischema}
data={data}
renderers={renderers}
cells={vanillaCells}
onChange={({ errors, data }) => {
props.onFormDataChange(data, errors);
}}
validationMode={validationMode}
ajv={handleDefaultsAjv}
/>

Hi @achy,

The AJV default support does not apply in this case, as it can only set undefined values. However as this is an array of string values, JSON Forms will (in version 3.0) add an empty string in the array.

With the current version of JSON Forms, JSON Forms will honor the default value when creating a new array item. However as the default value is "c" and the field is an enum of [“a”,“b”], the "c" will be successfully set in the data but the renderers will not be able to display it, as it’s not a valid value. Also you will get validation errors, again as it is not a valid value.