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

translateWithId(id) methods list wrong type for id #17054

Closed
1 task done
wkeese opened this issue Jul 29, 2024 · 1 comment · Fixed by #17055
Closed
1 task done

translateWithId(id) methods list wrong type for id #17054

wkeese opened this issue Jul 29, 2024 · 1 comment · Fixed by #17055

Comments

@wkeese
Copy link
Contributor

wkeese commented Jul 29, 2024

The problem

Many of the translateWithId() methods are listed as taking a string as the first parameter. But those functions actually take something more like an enum. So with the current Carbon, this app code fails:

const comboboxTranslation = (
  id: "close.menu" | "open.menu" | "clear.all" | "clear.selection"
) => { ... }

...

<ComboBox ... translateWithId={comboboxTranslation}

The solution

Declare translateWithId() with proper type for id aka key.

Examples

No response

Application/PAL

IKC

Business priority

None

Available extra resources

I'll make the PR

Code of Conduct

Copy link
Contributor

Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.

If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.

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

Successfully merging a pull request may close this issue.

2 participants