You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the onClick property for the DatePicker component and it works fine, the only issue is that my VSC typescript linter is indicating that it is not a part of the type definition for this component.
I have searched the issues of this repository and believe that this is not a duplicate.
Expected Behavior
No type errors would be fantastic - and this is the only one I've run into so far!
Current Behavior
This is the error I'm getting: Property 'onClick' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<DatePicker> & Readonly<{ children?: ReactNode; }> ...'.
Steps to Reproduce (for bugs)
Have typescript setup in a react environment
Use import DatePicker from 'material-ui/DatePicker' to import the DatePicker. Right now, I'm getting around this error by using const DatePicker: any = require('material-ui/DatePicker'). Lame.
Add an onClick property to your DatePicker. Eg: ... onClick={ () => console.log('opening the datepicker') } ...
See annoying red stuff in your editor.
Context
Annoying typescript issue making me ask my boss annoying typescript questions. This is more an issue with typescript than you guys, but you've done a really awesome job so far, this is just a way to make it a little bit better.
Your Environment
We're running a react/redux/typescript app in Visual Studio Code. I installed the @types/material-ui file and it mostly works great, thanks for putting in all that work!
Tech
Version
Material-UI
0.20.0
React
16.2.0
browser
Visual Studio Code
1.19.1
@types/material-ui
0.20.1
The text was updated successfully, but these errors were encountered:
You are usingpropTypes, though, correct? I'm getting an another error that looks like one generated by that package and I wanted to make sure before I opened another issue. Thanks!
I'm using the
onClick
property for the DatePicker component and it works fine, the only issue is that my VSC typescript linter is indicating that it is not a part of the type definition for this component.Expected Behavior
No type errors would be fantastic - and this is the only one I've run into so far!
Current Behavior
This is the error I'm getting:
Property 'onClick' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<DatePicker> & Readonly<{ children?: ReactNode; }> ...'.
Steps to Reproduce (for bugs)
import DatePicker from 'material-ui/DatePicker'
to import the DatePicker. Right now, I'm getting around this error by usingconst DatePicker: any = require('material-ui/DatePicker')
. Lame.onClick
property to your DatePicker. Eg:... onClick={ () => console.log('opening the datepicker') } ...
Context
Annoying typescript issue making me ask my boss annoying typescript questions. This is more an issue with typescript than you guys, but you've done a really awesome job so far, this is just a way to make it a little bit better.
Your Environment
We're running a react/redux/typescript app in Visual Studio Code. I installed the
@types/material-ui
file and it mostly works great, thanks for putting in all that work!@types/material-ui
The text was updated successfully, but these errors were encountered: