-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
scope: listChanges related to the listChanges related to the listtype: bugIt doesn't behave as expected.It doesn't behave as expected.typescript
Description
The following code in not compiling anymore in mui v4.0:
<ListItem button={editable} >
<ListItemText primary="text" />
</ListItem>where editable is a boolean value.
- This is not a v0.x issue.
- I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior 🤔
Should compile without error.
Current Behavior 😯
Type 'boolean' is not assignable to type 'true'.
button={editable}
../../../node_modules/@material-ui/core/ListItem/ListItem.d.ts:23:38
23 ExtendButtonBase<ListItemTypeMap<{ button: true }, 'div'>>;
The expected type comes from property 'button' which is declared here on type 'IntrinsicAttributes & { action?: ((actions: ButtonBaseActions) => void) | undefined; buttonRef?: ((instance: any) => void) | RefObject | null | undefined; centerRipple?: boolean | undefined; ... 6 more ...; TouchRippleProps?: Partial<...> | undefined; } & { ...; } & { ...; } & CommonProps<...> & Pick<...>'
Your Environment 🌎
| Tech | Version |
|---|---|
| Material-UI | 4.0.0-alpha.4 |
| React | 16.8.4 |
| @types/react | 16.8.8 |
| TypeScript | 3.3.3333 |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
scope: listChanges related to the listChanges related to the listtype: bugIt doesn't behave as expected.It doesn't behave as expected.typescript