feat(widget-list): add hiding list content with minimize_collapsed option (#3607)

This commit is contained in:
Hannes Küttner
2020-05-17 15:47:07 +02:00
committed by GitHub
parent 088b1a8ab6
commit 4dd58c5dcb
4 changed files with 1925 additions and 33 deletions

View File

@ -13,6 +13,7 @@ The list widget allows you to create a repeatable item in the UI which saves as
- `allow_add`: if added and labeled `false`, button to add additional widgets disappears
- `collapsed`: if added and labeled `false`, the list widget's content does not collapse by default
- `summary`: allows customization of a collapsed list item object in a similar way to a [collection summary](/docs/configuration-options/?#summary)
- `minimize_collapsed`: if added and labeled `true`, the list widget's content will be completely hidden instead of only collapsed if the list widget itself is collapsed
- `field`: a single widget field to be repeated
- `fields`: a nested list of multiple widget fields to be included in each repeatable iteration
- **Example** (`field`/`fields` not specified):
@ -63,3 +64,13 @@ The list widget allows you to create a repeatable item in the UI which saves as
- {label: Quote, name: quote, widget: string, default: "Everything is awesome!"}
- {label: Author, name: author, widget: string }
```
- **Example** (`minimize_collapsed` marked `true`):
```yaml
- label: "Testimonials"
name: "testimonials"
minimize_collapsed: true
widget: "list"
fields:
- {label: Quote, name: quote, widget: string, default: "Everything is awesome!"}
- {label: Author, name: author, widget: string }
```