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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

BottomNavigationAction component types conflict #27820

Open
2 tasks done
tudi2d opened this issue Aug 17, 2021 · 2 comments
Open
2 tasks done

BottomNavigationAction component types conflict #27820

tudi2d opened this issue Aug 17, 2021 · 2 comments
Labels
new feature New feature or request typescript

Comments

@tudi2d
Copy link
Contributor

tudi2d commented Aug 17, 2021

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 馃槸

When creating a BottomNavigationAction using a Link as a component & an onChange function prop it will trigger a No overload matches this call type error, even though this is a valid behaviour (& works just fine).

Expected Behavior 馃

The types of BottomNavigationAction should reflect the allowed behaviour.

Steps to Reproduce 馃暪

https://codesandbox.io/s/bottomnavigationaction-issue-g6txi?file=/CustomAction.tsx:408-438

Context 馃敠

I want to listen to the change event on a BottomNavigationAction component, which is rendered as a Link

Your Environment 馃寧

`npx @material-ui/envinfo` Summary of the result:

System:
OS: macOS 11.5.1
CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
Memory: 21.36 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.3 - ~/.nvm/versions/node/v14.17.3/bin/node
Yarn: 1.22.1 - ~/.nvm/versions/node/v12.22.1/bin/yarn
npm: 6.14.13 - ~/.nvm/versions/node/v14.17.3/bin/npm
Browsers:
Chrome: 92.0.4515.159
Monorepos:
Yarn Workspaces: 1.22.1
Lerna: 4.0.0

@tudi2d tudi2d added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 17, 2021
@eps1lon eps1lon added new feature New feature or request typescript and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 17, 2021
@arpitdalal
Copy link

I am also facing the same issue with using NavLink or Link component coming from react-router-dom, BottomNavigationAction doesn't like ref of HTMLAnchorElement? Please see the line 38 in this codesandbox file
Am I doing something wrong here?

@arpitdalal
Copy link

Hey @eps1lon!
Do you know why this is the case and how to get around it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request typescript
Projects
None yet
Development

No branches or pull requests

3 participants