MultiSelectionFilter's accordion IDs incorrectly use labels
Description
Checkbox filter-sections in MultiSelectionFilter appear to use a label prop to derive the id attribute of their section accordions. The label is a FormattedMessage, however, not a string, and this results in element IDs such as [object Object]-1.
For example, see the "Patron group" accordion of the main ui-users page.
Per @Yurii Danylenko This bug appears because filterConfig, passed to SearchAndFilter component, provides <FormattedMessage /> as a label. As a solution we can replace FormattedMessage with translation keys and translate label before passing to SearchAndFilter component. This should be done in all UI modules that use filterConfig. Link to PR for ui-requests https://github.com/folio-org/ui-requests/pull/326
The problematic code was refactored away at some point in the distant past.
Cate Boerema May 5, 2020 at 1:45 PM
@Zak Burke I'm trying to close old bugs and this one is more than a year old. Do you think this is still relevant/worth keeping? If so, do you think it could be classified as tech debt?
Checkbox filter-sections in MultiSelectionFilter appear to use a label prop to derive the
id
attribute of theirsection
accordions. The label is aFormattedMessage
, however, not a string, and this results in element IDs such as[object Object]-1
.For example, see the "Patron group" accordion of the main ui-users page.
Per @Yurii Danylenko
This bug appears because filterConfig, passed to SearchAndFilter component, provides <FormattedMessage /> as a label. As a solution we can replace FormattedMessage with translation keys and translate label before passing to SearchAndFilter component. This should be done in all UI modules that use filterConfig. Link to PR for ui-requests https://github.com/folio-org/ui-requests/pull/326