telerik / kendo-react

Issue tracker - KendoReact http://www.telerik.com/kendo-react-ui/
https://kendo-react-teal.vercel.app
Other
212 stars 37 forks source link

Regression: Some propTypes typings are not correct #311

Closed k290 closed 5 years ago

k290 commented 5 years ago

Current behavior

Error "types of property 'propTypes are incompatible" when using Prop typings for a generic HOC image

Expected behavior

Typings should be correct

Minimal reproduction of the problem with instructions

  1. Pull down https://github.com/k290/kendo-timepicker-issue and pull to latest commit
  2. Run npm install in root directory
  3. Open in VS Code
  4. Open "src/components/withValidation.component.tsx"

Observe that the affected components are: DateInput DatePicker TimePicker Combox DropdownList MultiSelect MaskedTextbox

While AutoComplete, NumericTextBox and Input are fine

This used to be working in Kendo React version 2.11

Package versions: "@progress/kendo-react-dateinputs": "3.2.2", "@progress/kendo-react-dropdowns": "3.2.2", "@progress/kendo-react-inputs": "3.2.2", "@progress/kendo-react-intl": "3.2.2", "@types/react": "16.9.2", "@types/react-dom": "16.8.5", "react": "16.8.6", "react-dom": "16.8.6"

System:

simonssspirit commented 5 years ago

Thank you for the example.

Wha we could suggest is using the following format for the withPipValidation component.

const withPipValidation = <P extends Object>(Component: typeof React.Component) =>

If this is not possible in the application, please let us know and we will research further.

k290 commented 5 years ago

Thanks. I'll have a look next week and let you know if that works for us

k290 commented 5 years ago

Thanks! I tThink you meant const withPipValidation = <P extends Object>(Component: typeof React.ComponentType)

This does work for us as we still get the strong typing when using the wrapped component e.g. on the props that are specified in the props objects at least e.g (DropDownListProps)