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

[EuiSearchBar] multiSelect: false forces auto-close even when explicitly turned off #2259

Closed
bevacqua opened this issue Aug 26, 2019 · 2 comments · Fixed by #7806
Closed
Assignees
Labels
bug good first issue low hanging fruit An issue, often a bug, that is lower effort and clearly ought to be fixed

Comments

@bevacqua
Copy link
Contributor

In a filter with multiSelect: false, autoClose: false it still auto closes the dropdown after clicking an option. If I have multiSelect: true, autoClose: false, it doesn't auto close.

@bevacqua bevacqua added the bug label Aug 26, 2019
@anishagg17
Copy link
Contributor

@bevacqua SearchBar doesn't support autoClose prop ,
@cchaos do you think this feature is required?

@cchaos
Copy link
Contributor

cchaos commented Mar 11, 2020

autoClose is a prop on FieldValueSelectionFilterProps. But this logic block doesn't account for forcing allowing autoClose: false && multiSelect: true

if (!multiSelect && autoClose) {
this.closePopover();
const query = checked
? this.props.query.removeSimpleFieldClauses(field)
: this.props.query
.removeSimpleFieldClauses(field)
.addSimpleFieldValue(field, value);
this.props.onChange(query);
} else {
if (multiSelect === 'or') {
const query = checked
? this.props.query.removeOrFieldValue(field, value)
: this.props.query.addOrFieldValue(field, value);
this.props.onChange(query);
} else {
const query = checked
? this.props.query.removeSimpleFieldValue(field, value)
: this.props.query.addSimpleFieldValue(field, value);
this.props.onChange(query);
}
}
}

@cchaos cchaos changed the title <EuiSearchBar> — multiSelect: false forces auto-close even when explicitly turned off [EuiSearchBar] multiSelect: false forces auto-close even when explicitly turned off Sep 20, 2020
@cee-chen cee-chen added the low hanging fruit An issue, often a bug, that is lower effort and clearly ought to be fixed label May 8, 2023
@cee-chen cee-chen self-assigned this May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue low hanging fruit An issue, often a bug, that is lower effort and clearly ought to be fixed
Projects
None yet
4 participants