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]: TableToolbarSearch onChange value is always undefined #18008

Closed
2 tasks done
adamalston opened this issue Nov 6, 2024 · 0 comments · Fixed by #18012
Closed
2 tasks done

[Bug]: TableToolbarSearch onChange value is always undefined #18008

adamalston opened this issue Nov 6, 2024 · 0 comments · Fixed by #18012

Comments

@adamalston
Copy link
Contributor

adamalston commented Nov 6, 2024

Package

@carbon/react

Browser

No response

Package version

1.67.1

React version

No response

Description

Although the TypeScript types for TableToolbarSearch's onChange event handler indicates it may return a value, it doesn't seem to.

/**
* Provide an optional hook that is called each time the input is updated
*/
onChange?: (
event: '' | ChangeEvent<HTMLInputElement>,
value?: string
) => void;

Reproduction/example

https://stackblitz.com/edit/github-4gatub?file=src%2FApp.tsx

Steps to reproduce

  1. Open the reproduction.
  2. Open the browser console.
  3. Enter 123 in the search bar.
  4. Notice that nothing appears to change and that undefined is logged to the console.

Suggested Severity

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

Application/PAL

DataPower

Code of Conduct

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

Successfully merging a pull request may close this issue.

2 participants