Using Vue 3 with vuetify and jsonforms/vue-vuetify installed. I’m just testing around but can’t seem to get two renderer to work. i have two renderer one is rating , one is multiselect dropdown which using v-select.
const schema = {
properties: {
name: {
type: “string”,
minLength: 3,
description: “The task’s name”,
},
agree: {
type: “boolean”,
},
dueDate: {
type: “string”,
format: “date”,
description: “The task’s due date”,
},
category: {
type: “string”,
enum: [“Never”, “Daily”, “Weekly”, “Monthly”],
description: “Select one”,
},
multiSelect: {
type: “array”,
uniqueItems: true,
enum: [“Enum1”, “Enum2”, “Enum3”, “Enum4”, “Enum5”],
description: “Select multiple”,
},
rating: {
type: “integer”,
minimum: 0,
maximum: 5,
},
},
required: [“name”],
};
const uischema = {
type: "VerticalLayout",
elements: [
{
type: "Control",
scope: "#/properties/agree",
},
{
type: "Group",
label: "My Group",
rule: {
effect: "SHOW",
condition: {
scope: "#/properties/agree",
schema: { const: true },
},
},
elements: [
{
type: "Control",
scope: "#/properties/name",
},
],
},
{
type: "VerticalLayout",
elements: [
{
type: "Control",
scope: "#/properties/dueDate",
},
{
type: "Control",
scope: "#/properties/category",
},
{
type: "Control",
scope: "#/properties/multiSelect",
},
{
type: "Control",
scope: "#/properties/rating",
},
],
},
],
};
const customRenderers = markRaw([
…extendedVuetifyRenderers,
{ renderer: MultiSelectRenderer, tester: multiSelectTester },
{ renderer: RatingRenderer, tester: ratingTester },
]);
const renderers = Object.freeze(customRenderers);
export const multiSelectTester = rankWith(
5, // Priority rank
(uischema, schema) => uischema.scope === “#/properties/multiSelect”,
);
export const ratingTester = rankWith(
6, // Priority rank
(uischema, schema) => uischema.scope === “#/properties/rating”,
);
The multiselect dropdown doesn’t use the custom renderer. Can help advice what am I missing