feat(netlify-cms-widget-list): allow 'summary' field (#3616)

This commit is contained in:
Derek Nguyen
2020-05-11 22:30:29 +09:00
committed by GitHub
parent c9a2fec2da
commit 7cc4c89539
5 changed files with 228 additions and 10 deletions

View File

@ -163,6 +163,7 @@ To use variable types in the list widget, update your field configuration as fol
- `types`: a nested list of object widgets. All widgets must be of type `object`. Every object widget may define different set of fields.
- `typeKey`: the name of the field that will be added to every item in list representing the name of the object widget that item belongs to. Ignored if `types` is not defined. Default is `type`.
- `summary`: allows customization of a collapsed list item object in a similar way to a [collection summary](/docs/configuration-options/?#summary)
### Example Configuration
@ -177,6 +178,7 @@ either a "carousel" or a "spotlight". Each type has a unique name and set of fie
- label: 'Carousel'
name: 'carousel'
widget: object
summary: '{{fields.header}}'
fields:
- { label: Header, name: header, widget: string, default: 'Image Gallery' }
- { label: Template, name: template, widget: string, default: 'carousel.html' }