-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Closed
Labels
Milestone
Description
Ref callback is successfully working for ExpansionPanel but ExpansionPanelProps not containing ref method declaration in https://github.com/mui-org/material-ui/blob/master/packages/material-ui/src/ExpansionPanel/ExpansionPanel.d.ts
- 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 🤔
No errors.
Current Behavior 😯
I see error:
Type '{ children: Element; expanded: false; ref: ((ref?: any) => void) | undefined; }' is not assignable to type 'IntrinsicAttributes & ExpansionPanelProps & { children?: ReactNode; }'.
Property 'ref' does not exist on type 'IntrinsicAttributes & ExpansionPanelProps & { children?: ReactNode; }'.ts(2322)
Steps to Reproduce 🕹
Put code
<ExpansionPanel expanded={false} ref={ref}>
...
</ExpansionPanel>
and run linter.
Tech | Version |
---|---|
Material-UI | v3.1.0 |
React | 16.5.2 |
Browser | |
TypeScript | 2.8.3 |
etc. |