Skip to content

Async multiselect component list not closing when clicking outside of the component #5086

@jordanshardy

Description

@jordanshardy

Hi.

I am trying to fix a bug on my website; when I select multiple users from the async select component I am not able to close the component by selecting elsewhere on the page. The only way to close to the component is by selecting itself, otherwise, the dropdown stays open.

See example here

It's difficult to share the code as this is a complex app. However it will help to know that I am defining a custom Async component with these props:

<SelectAsync
  disabled={choice === CHOICES.broadcast}
  loadOptions={onLoadUsers}
  additional={{ page: 1 }}
  multiselect={true}
  closeOnSelect={false}
  onChange={handleChangeSelect}
  placeholder="Select contact(s) ..."
  inputPrefix="To:"
  value={selected}
/>

I know it will be hard to debug without the source code, but any ideas as to why the component is staying open that would be great.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting-author-responseIssues or PRs waiting for more information from the authorissue/bug-unconfirmedIssues that describe a bug that hasn't been confirmed by a maintainer yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions