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

Merged
merged 2 commits into from
Jan 16, 2025
Merged

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
@zburke zburke merged commit a1087ef into master Jan 16, 2025
5 checks passed
@zburke zburke deleted the UIU-3312 branch January 16, 2025 14:05
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.

2 participants