-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add labeling opportunity to <Filter>
component
#2892
Conversation
bccafcf
to
a66a5aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assets/js/common/Filter/Filter.jsx
Outdated
const parsedValue = typeof value === 'string' ? [value] : value; | ||
|
||
const selectedLabels = parsedValue.reduce((acc, key) => { | ||
const e = labeledOptions.find(([optionKey]) => optionKey === key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d039a74: --pedantic mode
Yes I am
Description
The
<Filter>
component now allows options as key/value pairs. This is to cope with cases in which the value of the element must be different than the one shown.Also, it enables a single value to be selected using a simple string, being more permissive on the allowed input.
This PR introduces no breaking changes.
Usage