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

FilterableSelect does not work with single option #6654

Closed
1 task done
nick-khaustov-sage opened this issue Apr 2, 2024 · 2 comments
Closed
1 task done

FilterableSelect does not work with single option #6654

nick-khaustov-sage opened this issue Apr 2, 2024 · 2 comments

Comments

@nick-khaustov-sage
Copy link

nick-khaustov-sage commented Apr 2, 2024

Description

When FilterableSelect has a single option, typing in the search box leads to crash with exception

Uncaught TypeError: list.find is not a function
    at findElementWithMatchingText (carbon-react_lib_components_select.js?v=6f4a0343:46078:17)
    at carbon-react_lib_components_select.js?v=6f4a0343:46088:23
    at basicStateReducer (chunk-EYPFM2SM.js?v=70b4df42:11633:49)
    ...

Reproduction

https://stackblitz.com/edit/parsium-carbon-starter-df8xvy?file=src%2FApp.tsx

Steps to reproduce

Focus in the select and start typing.

JIRA ticket numbers (Sage only)

No response

Suggested solution

No response

Carbon version

128.0.0

Design tokens version

No response

Relevant browsers

Chrome

Relevant OSs

MacOS

Additional context

No response

Confidentiality

  • I confirm there is no confidential or commercially sensitive information included.
@nick-khaustov-sage nick-khaustov-sage added Bug triage Triage Required labels Apr 2, 2024
@Parsium
Copy link
Contributor

Parsium commented Apr 2, 2024

FE-6413

@Parsium Parsium added On Backlog select and removed triage Triage Required labels Apr 2, 2024
DipperTheDan added a commit that referenced this issue Apr 16, 2024
…ponent has a single option

Currently a runtime error is thrown when filterable-select has a single option. This work ensures
that this behaviour is handled correctly with no runtime errors firing.

fixes #6654
carbonci pushed a commit that referenced this issue Apr 23, 2024
### [133.0.1](v133.0.0...v133.0.1) (2024-04-23)

### Bug Fixes

* **filterable-select:** ensure no runtime error is triggered when component has a single option ([4926092](4926092)), closes [#6654](#6654)
* **multi-select:** ensure console error is not fired when component has a single option ([1914940](1914940))
@carbonci
Copy link
Collaborator

🎉 This issue has been resolved in version 133.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants