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

ListItem with button={boolean} causes TypeScript error #19264

Closed
2 tasks done
bc-m opened this issue Jan 16, 2020 · 1 comment
Closed
2 tasks done

ListItem with button={boolean} causes TypeScript error #19264

bc-m opened this issue Jan 16, 2020 · 1 comment
Labels
component: button This is the name of the generic UI component, not the React module! component: list This is the name of the generic UI component, not the React module!

Comments

@bc-m
Copy link
Contributor

bc-m commented Jan 16, 2020

  • 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 😯

This code-snippet <ListItem button={!deactivate}>/* content */</ListItem> causes following TypeScript error:

TS2769: No overload matches this call.   
The last overload gave the following error.     
Type 'boolean' is not assignable to type 'true'.

Steps to Reproduce 🕹

https://codesandbox.io/s/material-demo-f89tj?fontsize=14&hidenavigation=1&theme=dark

Context 🔦

We want to create a list-component, which contains list-items with optional button-behaviour.

Your Environment 🌎

Tech Version
Material-UI v4.8.3
React 16.12.0
TypeScript 37.4
@eps1lon
Copy link
Member

eps1lon commented Jan 16, 2020

Duplicate of #14971

@eps1lon eps1lon marked this as a duplicate of #14971 Jan 16, 2020
@eps1lon eps1lon closed this as completed Jan 16, 2020
@zannager zannager added component: list This is the name of the generic UI component, not the React module! component: button This is the name of the generic UI component, not the React module! labels Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: button This is the name of the generic UI component, not the React module! component: list This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests

3 participants