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

UIU-3312 provide itemToString to correctly serialize options #2843

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zburke
Copy link
Member

@zburke zburke commented Jan 15, 2025

MultiSelection creates unique key attributes for its options with a default function of

(option) => option ? option.label : ''

but the label attribute here is a <FormattedMessage>, leading that function to serialize all options as [object Object]. Since we know the value attribute here is a unique string, we use that instead.

Refs UIU-3312

`MultiSelection` creates unique `key` attributes for its options with a
default function of
```
(option) => option ? option.label : ''
```
but the `label` attribute here is a `<FormattedMessage>, leading that
function to serialize all options as `[object Object]`. Since we know
the `value` attribute here is a unique string, we use that instead.

Refs UIU-3312
@zburke zburke requested a review from s3fs January 15, 2025 20:45
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

Successfully merging this pull request may close these issues.

1 participant