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]: Dropdown throws an error when ref is provided #18263

Open
2 tasks done
shocquu opened this issue Dec 18, 2024 · 2 comments
Open
2 tasks done

[Bug]: Dropdown throws an error when ref is provided #18263

shocquu opened this issue Dec 18, 2024 · 2 comments
Assignees
Labels

Comments

@shocquu
Copy link

shocquu commented Dec 18, 2024

Package

@carbon/react

Browser

No response

Package version

1.72.0

React version

18.0.0

Description

The Dropdown component, while it accepts refs, results in an error when a ref is provided:

Property 'ref' does not exist on type 'IntrinsicAttributes & Omit<DropdownProps<any> & { children?: ReactNode; } & RefAttributes<HTMLButtonElement>, "ref">'

Reproduction/example

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

Steps to reproduce

  1. Import and use Dropdown,
  2. Create a ref using useRef(),
  3. Add the ref to Dropdown

Suggested Severity

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

Application/PAL

Lineage UI

Code of Conduct

@shocquu shocquu changed the title [Bug]: [Bug]: Dropdown throws an error when ref is provided Dec 18, 2024
@shocquu
Copy link
Author

shocquu commented Dec 18, 2024

I don't have permission here, so please assign me to the task.

@Gururajj77
Copy link
Contributor

Hey @shocquu , Thanks for raising this issue, you can work on this issue and raise a PR for us to review it.

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

No branches or pull requests

3 participants