You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/react-renderer-demo/src/app/pages/renderer/condition.md
+48-1Lines changed: 48 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,54 @@ You can show a field only if it meets a condition:
32
32
}
33
33
```
34
34
35
-
`when` - is name of field where the value is stored, **always required!**
35
+
`when` - is name of field where the value is stored, **always required!**. It can be either string `'field-name'` or array of strings `['field-1', 'field-2']`.
36
+
37
+
#### OR condition. At least one condition must be met
38
+
39
+
If either of of fields with name `a` and `b` will have value `x` condition is met.
40
+
41
+
```jsx
42
+
{
43
+
fields: [{
44
+
name:'Or condition',
45
+
component:'text-field',
46
+
condition: {
47
+
when: ['a', 'b'],
48
+
is:'x'
49
+
}
50
+
}]
51
+
}
52
+
```
53
+
54
+
#### AND condition. All conditions must be met
55
+
56
+
Field `controlled-field-1` must have value `Bar` and field `controlled-field-2` must include `FooBar` somewhere in its value to display field `BarFoo`.
0 commit comments