Is there a way to group common columns without loosing type safety? #5764
Unanswered
IamAyaanSk
asked this question in
Q&A
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was working on creating a ssr table using shadcn and tanstack table, I was able to make a reusable datatable component but I was stuck finding an ideal approach to handle common columns among tables .
Consider the below code snippet. I am separating common columns by creating a separate columndef array with any, is there a more better way which is type safe to achieve this?
This is how I am then using it
As this is not quite type safe as there are any everywhere. Can you please suggest a more better way.
Beta Was this translation helpful? Give feedback.
All reactions