-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
enhancementNew feature or requestNew feature or request
Description
If you want to extract a renderer or memoize it using useCallback
, you currently need to type the arguments manually as they can not be infered from the grid and types such as GridBodyReactRendererProps
are not exported:
const toggleDetailsRenderer = ({ item }: { item: Person }) => {
...
};
That gets more complex if you want to use state from the model.
Instead this should be possible:
import type { GridBodyReactRendererProps } from '@vaadin/react-components';
const toggleDetailsRenderer = ({ item }: GridBodyReactRendererProps<Person>) => {
...
};
Maybe there should also be a GridReactBodyRenderer<T>
that types the whole function.
Another concern is that web component types such as GridBodyRenderer
are exported, which can be confusing because they can not be used with the React component.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request