[V8] How to add types for a Cell function #4206
-
Hello! I've been using the previous version of react-table for quite some time and decided to start exploring v8 and everything is going pretty well so far. However I keep running into something that I'm not sure was a design decision or if it was just overlooked. If I have a column like this columnHelper.accessor((row) => row.year || "", {
id: "year",
cell: (info) => <InlineEditInput info={info} type="number" />,
}), How would I add add prop types to the I see that the type should be |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
I am also stuck in this. While checking the code, I see it's mentioned but seems like it hasn't been exported in the package. @tannerlinsley is there anything that we can do for this? |
Beta Was this translation helpful? Give feedback.
-
@iamgrawal is right, and as pointed out, there is a
This is confirmed via the docs as well, @tannerlinsley do I have this right? Note: Although |
Beta Was this translation helpful? Give feedback.
-
It looks like this has been resolved, although I'm not sure in which version it was changed. |
Beta Was this translation helpful? Give feedback.
-
Thanks! I've been needing this. Dealing with a bug that got past TypeScript because |
Beta Was this translation helpful? Give feedback.
It looks like this has been resolved, although I'm not sure in which version it was changed.
CellContext
is now able to be imported:import { CellContext, createColumnHelper } from "@tanstack/react-table";