enhancement(widget-relation): support custom options length (#2520)

This commit is contained in:
Zach Schnackel
2019-09-09 16:16:15 -04:00
committed by Shawn Erquhart
parent 97f1f84b69
commit 49e142ef59
4 changed files with 29 additions and 2 deletions

View File

@ -15,6 +15,7 @@ The relation widget allows you to reference items from another collection. It pr
- `searchFields`: (**required**) list of one or more names of fields in the referenced collection to search for the typed value. Syntax to reference nested fields is similar to that of *displayFields*.
- `valueField`: (**required**) name of the field from the referenced collection whose value will be stored for the relation. Syntax to reference nested fields is similar to that of *displayFields* and *searchFields*.
- `multiple` : accepts a boolean, defaults to `false`
- `optionsLength`: accepts integer to override number of options presented to user. Defaults to `20`.
- **Example** (assuming a separate "authors" collection with "name" and "twitterHandle" fields with subfields "first" and "last" for the "name" field):
```yaml
- label: "Post Author"