I have implemented a custom renderer for a dropdown and need to show a second dropdown based on the value selected in the first dropdown. The second dropdown should only appear if the value of the first dropdown matches a specific condition.
I attempted to achieve this using the following rule:
{
“type”: “Control”,
“scope”: “#/properties/otherDocuments/properties/diversityClassificationCode”,
“rule”: {
“effect”: “SHOW”,
“condition”: {
“scope”: “#/properties/otherDocuments/properties/docType”,
“schema”: { “const”: “41c980” }
}
}
However, the second dropdown is always visible, regardless of the condition. I am using the following DropDownTester
:
export const DropDownTester: any = rankWith(
100,
and(
uiTypeIs(“Control”),
schemaMatches((schema: any) => {
console.log(“schema”, schema);
if (schema.hasOwnProperty(“customRender”)) {
var cellschema: any = schema;
return cellschema[“customRender”] === “dropdown”;
}
return false;
})
)
);
This is my schema
Can anybody please help me with this?