Skip to content

Commit

Permalink
UIU-3312 provide itemToString to correctly serialize options
Browse files Browse the repository at this point in the history
`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
  • Loading branch information
zburke committed Jan 15, 2025
1 parent 1f4afe4 commit 85475e1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Update fee/fine actions column UX for accessibility. Refs UIU-3027.
* Rename permission after BE changes. Refs UIU-3309.
* Change import of `exportToCsv` from `stripes-util` to `stripes-components`. Refs UIU-3202.
* Provide `itemToString` to create unique `key` attributes. Refs UIU-3312.

## [11.0.10](https://github.com/folio-org/ui-users/tree/v11.0.10) (2025-01-10)
[Full Changelog](https://github.com/folio-org/ui-users/compare/v11.0.9...v11.0.10)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ const EditContactInfo = ({
fullWidth
disabled={disabled}
filter={prefEmailCommFilterOptions}
itemToString={(option) => option.value}
/>
</Col>
</Row>
Expand Down

0 comments on commit 85475e1

Please sign in to comment.