I'm trying to integrate Typescript into my current project, but I'm unable to use Grid with it.
Here's the sample code:
import React from 'react';
import {Grid, GridColumn} from "@progress/kendo-react-grid";
export default function App(){
const data = [{id: 1}];
return <div className="App">
<Grid data={data}>
<GridColumn field="id"/>
</Grid>
</div>
}
Here's the error:
TS2322: Type '{ children: Element; data: { id: number; }[]; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Grid> & Pick<Pick<Readonly<GridProps>, keyof GridProps> & Pick<...> & Pick<...>, keyof GridProps> & InexactPartial<...> & InexactPartial<...>'.
Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Grid> & Pick<Pick<Readonly<GridProps>, keyof GridProps> & Pick<...> & Pick<...>, keyof GridProps> & InexactPartial<...> & InexactPartial<...>'.
This error shows for any Grid's prop, not only data, but if there won't be any Grid's prop set, but only a child - Typescript compiles the code.
Is it only happening on my side?
Thank you for any help.