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

[Bug]: ComboBox: Using the shouldFilterItem prop no longer works with onChange #16630

Closed
2 tasks done
ddrosario opened this issue May 31, 2024 · 0 comments · Fixed by #16835
Closed
2 tasks done

[Bug]: ComboBox: Using the shouldFilterItem prop no longer works with onChange #16630

ddrosario opened this issue May 31, 2024 · 0 comments · Fixed by #16835
Assignees
Labels
severity: 2 https://ibm.biz/carbon-severity type: bug 🐛

Comments

@ddrosario
Copy link

Package

@carbon/react

Browser

Chrome, Firefox

Package version

1.58.1

React version

18.0.0

Description

Using the shouldFilterItem prop in ComboBox no longer works. If you filter items and click on a filtered item, the wrong item is passed in the onChange. eg. If the filtered list is one item long, and the original list is more. When you click on the filtered item, you will get back the first item from the original list.

Reproduction/example

https://codesandbox.io/p/sandbox/carbonreactcomboboxissue-fpyshg?file=%2Fsrc%2FApp.js%3A10%2C20

Steps to reproduce

On version 1.58.1 with a Combobox with a shouldFilterItem function.
items: ['first', 'second', 'third']

  1. Type in input third
  2. Click on only item in list (third)
  3. Observe selected item in onChange will be first

Suggested Severity

Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.

Application/PAL

No response

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
severity: 2 https://ibm.biz/carbon-severity type: bug 🐛
Projects
Archived in project
2 participants