feat: add min and max fields to relation widget (resolves #5026) (#5238)

This commit is contained in:
Ned Zimmerman
2021-04-12 13:54:51 -03:00
committed by GitHub
parent 6561939d42
commit fe117e472e
25 changed files with 67 additions and 44 deletions

View File

@ -16,6 +16,8 @@ The relation widget allows you to reference items from another collection. It pr
* `display_fields`: list of one or more names of fields in the referenced collection that will render in the autocomplete menu of the control. Defaults to `value_field`. Syntax to reference nested fields is similar to that of *value_field*.
* `default`: accepts any widget data type; defaults to an empty string
* `multiple` : accepts a boolean, defaults to `false`
* `min`: minimum number of items; ignored if **multiple** is `false`
* `max`: maximum number of items; ignored if **multiple** is `false`
* `options_length`: accepts integer to override number of options presented to user. Defaults to `20`.
* **Referencing a folder collection example** (assuming a separate "authors" collection with "name" and "twitterHandle" fields with subfields "first" and "last" for the "name" field):