Skip to content

filterWith option for field_value_selection filters#1328

Merged
bevacqua merged 5 commits intoelastic:masterfrom
bevacqua:filter-with-for-filter-fields
Nov 27, 2018
Merged

filterWith option for field_value_selection filters#1328
bevacqua merged 5 commits intoelastic:masterfrom
bevacqua:filter-with-for-filter-fields

Conversation

@bevacqua
Copy link
Contributor

Fixes #1327

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