Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a 'multiple' property to options #79

Open
evert opened this issue Jun 16, 2021 · 1 comment
Open

Add a 'multiple' property to options #79

evert opened this issue Jun 16, 2021 · 1 comment

Comments

@evert
Copy link

evert commented Jun 16, 2021

Mentioned in a few different threads, but I think it deserves its own issue.

When an 'options' property is present on a property, it potentially allows the selection of more than one item.
In JSON, if multiple are selected, this gets encoded as an array of strings.

It would be helpful for our implementation if we can add an additional multiple property on the options object.

If multiple is set to true:

  • The value will always be encoded as an array. The array can have 0 or more properties. 0 if none is selected.
  • minItems and maxItems are allowed to be set.
  • value and selectedValues should be an array.

If multiple is set to false, or omitted (the default)

  • The value will be encoded as a string.
  • minItems and maxItems are ignored/forbidden.
    • value and selectedValues should be a string.
@evert evert changed the title Add a 'multiple' Add a 'multiple' property to options Jun 16, 2021
@mamund
Copy link
Owner

mamund commented Jun 16, 2021

seems reasonable. can you work up a HAL-FORMS example for review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants