I have a Table component with generics and I use a static component inside the Table to compose columns, also with generics.
The problem is that I would like the Column component to inherit the generic type passed to the Table when executing the data function, which gets the result passed to it.
I know typing explicitly will work, for example:
<Table.Column<TableItem> data={(item) => item.name} />
The real question is: Is it possible to perform this type inference from my Table component and pass it to the static Column component? So that I don't have to add the type explicitly to each column...
SANDBOX TO REPRODUCE, ONLY TABLE AND COLUMN COMPONENTS:
https://codesandbox.io/s/generic-table-column-r54lh?file=/src/App.tsx
