You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on the very delayed transition from V7 to V8 at the moment. Everything for the most part has been fairly smooth, but we're encountering substantial difficulty getting the types to conform for the columns field.
We have a React component, SortableTable, which takes columns as a prop. This is them passed to useReactTable to initialize the table.
Is there a suggested way to pass this type that doesn't require us to utilize an explicit any here? We try to avoid explicit any in our code base whenever possible.
A similar issue is posted here, but this is a more expansive explanation of the issue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm working on the very delayed transition from V7 to V8 at the moment. Everything for the most part has been fairly smooth, but we're encountering substantial difficulty getting the types to conform for the
columns
field.We have a React component,
SortableTable
, which takescolumns
as a prop. This is them passed touseReactTable
to initialize the table.We define
columns
as a Discriminated Union like:Then pass it to the SortableTable component with a generic argument:
SortableTable however seems to require us to use an
any
field due to the way the types are set up internally in ReactTable:Is there a suggested way to pass this type that doesn't require us to utilize an explicit any here? We try to avoid explicit any in our code base whenever possible.
A similar issue is posted here, but this is a more expansive explanation of the issue.
Beta Was this translation helpful? Give feedback.
All reactions