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

filterWith option for field_value_selection filters #1328

Merged
merged 5 commits into from
Nov 27, 2018

Conversation

bevacqua
Copy link
Contributor

Fixes #1327

@@ -48,6 +49,7 @@ const FieldValueSelectionFilterPropTypes = {
const defaults = {
config: {
multiSelect: true,
filterWith: `prefix`,
Copy link
Contributor

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) => {
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@chandlerprall chandlerprall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it, LGTM

@bevacqua bevacqua merged commit 0b159a8 into elastic:master Nov 27, 2018
@bevacqua bevacqua deleted the filter-with-for-filter-fields branch November 27, 2018 22:11
@snide snide mentioned this pull request Nov 30, 2018
1 task
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