Generic type support for dataItem in components (Eg: Grid)

0 Answers 7 Views
General Discussions Grid
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Grant asked on 20 Nov 2025, 01:20 PM

Hi team,

I'm working with KendoReact Grid and need to strongly type the `dataItem` property in custom cell components. Currently, `GridCustomCellProps` has `dataItem: any`, which loses type safety.

I've been creating wrapper types like:

// Base generic type for any Kendo component with dataItem
type WithTypedDataItem<K, D> = Omit<K, 'dataItem'> & { dataItem: D };

// Specific type aliases for common use cases
type TGridCustomCellProps<T> = WithTypedDataItem<GridCustomCellProps, T>;
// ... others

Questions:
1. Is there a native/commonly accepted way to type `dataItem` that I'm missing?
2. Are there plans to add generic type parameters to `GridCustomCellProps` (e.g., `GridCustomCellProps<TDataItem>`) in future releases?

This would improve type safety across Grid, ComboBox, DropDownList, and other components that use dataItem.

Thanks,
Grant

No answers yet. Maybe you can help?

Tags
General Discussions Grid
Asked by
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Share this question
or