fivetran / fivetran/jsonforms-antd-renderers

group + rule is not work

Open
#111 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
23
Forks
4
PR merge metrics
No merged PRs in 30d

Description

## jsonform
value.json
```json
{
"size": 1,
"container1": {
"name": "Initial Name for Container 1",
"image": "https://example.com/image.png"
},
"container2": {
"name": "Initial Name for Container 2",
"url": "https://example.com"
}
}
```
schema.json
```json
{
"type": "object",
"properties": {
"size": {
"type": "integer",
"title": "Size",
"enum": [1, 2],
"default": 1
},
"container1": {
"type": "object",
"title": "Container 1",
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"image": {
"type": "string",
"title": "Image URL"
}
}
},
"container2": {
"type": "object",
"title": "Container 2",
"properties": {
"name": {
"type": "string",
"title": "Name"
},
"url": {
"type": "string",
"title": "URL"
}
}
}
}
}
```
ui-schema.json
```json
{
"type": "VerticalLayout",
"elements": [
{
"type": "Control",
"scope": "#/properties/size",
"label": "Size",
"options": {
"format": "radio"
}
},
{
"type": "Group",
"label": "Container 1",
"elements": [
{
"type": "Control",
"scope": "#/properties/container1/properties/name",
"label": "Name"
},
{
"type": "Control",
"scope": "#/properties/container1/properties/image",
"label": "Image URL"
}
],
"rule": {
"effect": "SHOW",
"condition": {
"scope": "#/properties/size",
"schema": {
"const": 1
}
}
}
},
{
"type": "Group",
"label": "Container 2",
"elements": [
{
"type": "Control",
"scope": "#/properties/container2/properties/name",
"label": "Name"
},
{
"type": "Control",
"scope": "#/properties/container2/properties/url",
"label": "URL"
}
],
"rule": {
"effect": "SHOW",
"condition": {
"scope": "#/properties/size",
"schema": {
"const": 2
}
}
}
}
]
}
```

## result

![Image](https://github.com/user-attachments/assets/2f46f853-515f-4ded-a303-e1dfc84b4a07)

## other info
If it is a simple string, then it is fine.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.