Skip to content

Commit

Permalink
udpate README
Browse files Browse the repository at this point in the history
  • Loading branch information
yoraco committed Aug 16, 2020
1 parent 536c8f9 commit 4a79be1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -522,9 +522,16 @@ export class AppComponent {
```

### Conditional fields
It is possible to make the presence of a field depends on another field's value.
To achieve this you just have to add a `visibleIf` property to a field's definition.
Adding the value `$ANY$` to the array of conditional values,will make the field visible for any value inserted.
It is possible to make the presence of a field depends on another field's value.
To achieve this you just have to add a `visibleIf` property to a field's definition.

**Value**
The value to match is set as array item.
Setting multiple items will make the visiblity condition `true` if one of the values matches.
If it is required to match all values head over to the section `visibleIf` with `allOf` condition.

**$ANY$**
Adding the value `$ANY$` to the array of conditional values, will make the field visible for any value inserted.

```js
@Component({
Expand Down Expand Up @@ -564,7 +571,9 @@ export class AppComponent {
}
}
```
**$EMPTY$**
Assigning an empty Object to 'visibleIf' is interpreted as _visibleIf_ nothing, thereby the widget is hidden and not present in model.

```js
mySchema = {
"properties": {
Expand Down

0 comments on commit 4a79be1

Please sign in to comment.