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
Hi, I want to have a custom table build on top of the tanstack table but I struggle a little bit with types of the props. Should I go with a route where I set the table inside the BaseTable and pass props to it or the other way set the table in the parent component and use pass the table as a prop ???
I tried the 1st option where I set the table in BaseTable component and pass respective props to it. But typing some options from Tanstack table is not an easy task for me.
This is almost perfect what I need at least for now. One thing is missing is that I want a Tanstack state to be a prop of my BaseTable. Pagination property should not be touched but rest of the state should be able to be passed from parent. How I can type this??
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
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I want to have a custom table build on top of the tanstack table but I struggle a little bit with types of the props. Should I go with a route where I set the table inside the BaseTable and pass props to it or the other way set the table in the parent component and use pass the table as a prop ???
I tried the 1st option where I set the table in BaseTable component and pass respective props to it. But typing some options from Tanstack table is not an easy task for me.
Here's what I have so far.
This is almost perfect what I need at least for now. One thing is missing is that I want a Tanstack state to be a prop of my BaseTable. Pagination property should not be touched but rest of the state should be able to be passed from parent. How I can type this??
Beta Was this translation helpful? Give feedback.
All reactions