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

[Pickers] cannot set multi picker value correctly #1012

Open
johnsully83 opened this issue Jul 26, 2019 · 4 comments
Open

[Pickers] cannot set multi picker value correctly #1012

johnsully83 opened this issue Jul 26, 2019 · 4 comments
Labels

Comments

@johnsully83
Copy link
Member

When rendering a multi-picker, if you attempt to set the value of the picker via any of the normal methods, e.g.

  1. FieldInteractionAPI.setValue('field', array)
  2. NovoFormGroup.patchValue({ 'field': array })

The UI renders '[object Object]' for each of the elements in the array, regardless of whether the array consists of label/value pair object, or arbitrary JSON object with a format parameter. Tried all combinations of 'format', 'labelFormat', 'id', and various properties on the objects within the Array, including label/value.

@adrianossi
Copy link
Contributor

Is this only a rendering issue, or does it affect the form's value as well? I.e., if you save the form, does it persist or not?

@fayranne
Copy link
Collaborator

We're pretty sure it's only a rendering issue, however we never tested fully saving the form due to the UI bug.

@JoshNewbury
Copy link

Are there any updates? I believe I am experiencing the same exact issue. I am seeing that using API.setValue or patchValue on an internal picker works (form saves the value) when passing the id, but displays nothing in the form field. If you pass the entire object it will display the user correctly but will not save.

@MohamedMahmoud299
Copy link

MohamedMahmoud299 commented Nov 18, 2019

It worked when I just had a simple array of strings and the form actually saves an array of strings not string, id pairs

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

No branches or pull requests

7 participants