Hi Guys,
In GridProps for KendoReact Grid there is an error in the type information:
Found here: https://www.telerik.com/kendo-react-ui/components/grid/api/GridProps/#toc-rowrender
In the GridProps.d.ts file it is:
/**
* Fires when a row is about to be rendered. Overrides the default appearance of the row.
*/
rowRender?: (row: React.ReactElement<HTMLTableRowElement>, props: GridRowProps) => React.ReactNode;
This should be changed to:
rowRender?: (row: React.ReactElement<React.HtmlProps<HTMLTableRowElement>>, props: GridRowProps) => React.ReactNode;
Note that the React.ReactElement definition is:
interface ReactElement<P = any, T extends string | JSXElementConstructor<any> = string | JSXElementConstructor<any>> {
type: T;
props: P;
key: Key | null;
}
So the first type parameter should be the props typ.
I noted this while making use of it. After changing it it behaves sensibly. Worked around in my case by using 'as any' to void the type clash.
Cheers,
Stuart