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]: FilterableMultiSelect throw console error when 1st time click and select/unselect the value #16849

Open
2 tasks done
ambrishsinghibm opened this issue Jun 24, 2024 · 2 comments

Comments

@ambrishsinghibm
Copy link

Package

@carbon/react

Browser

Chrome, Firefox

Package version

v1.60.2

React version

18.2.0

Description

Hi Team,
I have integrated the latest carbon/react library in my application and using the FilterableMultiSelect control. After page load, if select/un-select the value from the control, it's throwing the console error as below

Warning: Cannot update a component (ContextProvider) while rendering a different component (ForwardRef(FilterableMultiSelect)). To locate the bad setState() call inside ForwardRef(FilterableMultiSelect), follow the stack trace as described in https://reactjs.org/link/setstate-in-render

I observed the same issue in "MultiSelect" drop down as well. here are the defect details #15758
Please provide the solution for this. Let me know if you need any other details

Thanks

Reproduction/example

https://stackblitz.com/edit/github-1ljccm-n43dwk?file=src%2FApp.jsx

Steps to reproduce

  1. Open the URL: https://stackblitz.com/edit/github-1ljccm-n43dwk?file=src%2FApp.jsx
  2. Select/un-select the value
  3. See the developer tool consol error

Suggested Severity

Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.

Application/PAL

No response

Code of Conduct

@Tomahaawk
Copy link
Contributor

Same happening with in my application after upgrading carbon to @carbon/react 1.61

@JoseBiescas
Copy link

Seeing the same issue with MultiSelect component as well. The first click on an item, whether selecting or deselecting the warning pops up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ⏱ Backlog
Development

No branches or pull requests

4 participants