Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Agreed with the overhead, it feels like some type factories should be provided for user-land. Thanks @tar-aldev, your example worked great! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to create a generic table component.
I want to keep definition of the columns and table creation outside of it.
So, let's say I have this
Then I create some columns using the
table
from above code.Then I do
It all goes well, until I am trying to type anything in generic Table component. Because I added some custom meta to
column
and I need to pass type fordata
I am unsure what's the best way.I tried creating a type like
But then it looks like I have to duplicate a bunch of types in place where I create columns and table and in generic table component. I see no other way, because I cannot find any exported types I could use?
I obviously cannot just do
because it will give typescript errors for type conversion...
Tbh it looks like a huge overhead compared to v7, where I could just pass data type and it worked.
Beta Was this translation helpful? Give feedback.
All reactions