Skip to content

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

Closed

Description

@bevacqua

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.

Activity

  1. anishagg17 commented on Mar 8, 2020

    @anishagg17
    Contributor

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

  2. cchaos commented on Mar 11, 2020

    @cchaos
    Contributor

    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);
    }
    }
    }

  3. 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[/+] on Sep 20, 2020
  4. added
    low hanging fruit
    on May 8, 2023
  5. self-assigned this
    on May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issuelow hanging fruit

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions