-
Notifications
You must be signed in to change notification settings - Fork 843
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
filterWith option for field_value_selection filters #1328
filterWith option for field_value_selection filters #1328
Conversation
@@ -48,6 +49,7 @@ const FieldValueSelectionFilterPropTypes = { | |||
const defaults = { | |||
config: { | |||
multiSelect: true, | |||
filterWith: `prefix`, |
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.
Use single quotes instead as no interpolation is used
shown: prevState.options.all.filter(option => { | ||
const name = this.resolveOptionName(option); | ||
return name.toLowerCase().startsWith(prefix.toLowerCase()); | ||
shown: prevState.options.all.filter((option, i, options) => { |
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.
Can you add a docs example using this new config, and documenting both includes
and a custom function?
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.
Done
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.
Love it, LGTM
Fixes #1327