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]: TS error: href prop does not exist in SwitcherItem type #15510

Closed
2 tasks done
ecrvich opened this issue Jan 8, 2024 · 3 comments · Fixed by #16043
Closed
2 tasks done

[Bug]: TS error: href prop does not exist in SwitcherItem type #15510

ecrvich opened this issue Jan 8, 2024 · 3 comments · Fixed by #16043
Assignees

Comments

@ecrvich
Copy link

ecrvich commented Jan 8, 2024

Package

@carbon/react

Browser

Chrome

Package version

1.47

React version

18.2

Description

See screenshot below. Existing code still works at runtime. Worked around by moving the href prop up one line so it could be ignored with @ts-ignore.

image

Reproduction/example

Any use of SwitcherItem with the href prop will show this.

Steps to reproduce

Any use of SwitcherItem with the href prop will show this.

Suggested Severity

Severity 4 = Unrelated to a user task, has a workaround or does not need a workaround.

Application/PAL

CDD Hub

Code of Conduct

@ecrvich
Copy link
Author

ecrvich commented Mar 13, 2024

Perhaps worth mentioning that the SwitcherItem API doc no longer shows that prop either.

image

@2nikhiltom
Copy link
Contributor

Hey @ecrvich , could you share more, potentially a screen recording, of how you observed this bug? I am unable to reproduce on the storybook.

Screen.Recording.2024-03-21.at.20.04.28.mov

Sandbox link

@ecrvich
Copy link
Author

ecrvich commented Mar 22, 2024

This is a TypeScript compiler error. i.e., you need to be coding with .ts and .tsx files, and preferably have strict set to true in your tsconfig file.

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

Successfully merging a pull request may close this issue.

4 participants