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

[Menu] MenuListProps 'component' prop typescript error when used within Menu component #32872

Closed
2 tasks done
MantasSutkevicius opened this issue May 23, 2022 · 1 comment · Fixed by #35924
Closed
2 tasks done
Labels
bug 🐛 Something doesn't work component: menu This is the name of the generic UI component, not the React module! typescript

Comments

@MantasSutkevicius
Copy link

MantasSutkevicius commented May 23, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

When using Menu component, I want to change the list component HTML element to be a nav instead of default ul.

I can achieve this by providing Menu component with:

MenuListProps={{
  component: 'nav',
}}

This works as expected and it changes the HTML element to nav, but I get this typescript error saying that 'component' prop does not exist. I could just suppress this error with @ts-ignore but I'd like to avoid that.

image

Expected behavior 🤔

No response

Steps to reproduce 🕹

No response

Context 🔦

No response

Your environment 🌎

No response

@MantasSutkevicius MantasSutkevicius added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label May 23, 2022
@ZeeshanTamboli
Copy link
Member

ZeeshanTamboli commented May 31, 2022

Although a different component but it's related to #27703 and #32392. PR was opened for it in #32404 but did not went ahead with the solution.

More details in #32404 (comment) for the root problem.

@ZeeshanTamboli ZeeshanTamboli added component: menu This is the name of the generic UI component, not the React module! typescript bug 🐛 Something doesn't work and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels May 31, 2022
@ZeeshanTamboli ZeeshanTamboli changed the title MenuListProps 'component' prop typescript error when used within Menu component [Menu] MenuListProps 'component' prop typescript error when used within Menu component May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: menu This is the name of the generic UI component, not the React module! typescript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants