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]: Carbon/react ComboBox onChange prop is not getting called after production build. (tested in both React and Next JS). #18193

Closed
2 tasks done
sojinantony01 opened this issue Dec 4, 2024 · 2 comments

Comments

@sojinantony01
Copy link

Package

@carbon/react

Browser

Chrome

Package version

1.70.0

React version

18.3.1

Description

Carbon/react ComboBox onChange prop is not getting called after production build. (tested in both React and Next JS).
Tested same in carbon react versions 1.69.0 1.70.0 1.71.1. Found issue in all three versions.

Reproduction/example

It is found only in production version.

Steps to reproduce

  • Create react application

import { ComboBox } from '@carbon/react';

function App() {
    const filterItems = (menu) => {
      return menu?.item?.toLowerCase().includes(menu?.inputValue?.toLowerCase());
    };
    const onChange = (e) => {
      console.log("onCHange called", e)
    }
  return (
    <div className="App">
      <ComboBox allowCustomValue shouldFilterItem={filterItems} onChange={onChange} id="carbon-combobox" items={['Apple', 'Orange', 'Banana', 'Pineapple', 'Raspberry', 'Lime']} titleText="ComboBox title" helperText="Combobox helper text" />
    </div>
  );
}

export default App;
  • Render this component

  • Build the application and serve the build version

  • Check on change calls

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

@AlanGreene
Copy link
Contributor

Duplicate of #18145 maybe?

@sojinantony01
Copy link
Author

Yes, it looks like duplicate of #18145
Closing as other issue already merged and fix available in 1.72.0-rc.0

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

No branches or pull requests

2 participants