How to add lazy loading to react-table v7 with static JSON as data? #4668
Unanswered
yashwant-raut
asked this question in
Q&A
Replies: 0 comments
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.
-
Using the react-table v7 library, I'm making a table. The data I'm supplying in this table is prefetched and saved as JSON. This JSON file has the formatting that react-table requires.
But My data is very vast and has numerous deep hierarchies. Expanded option tables are what I'm making.
When I feed this data into a react-table, the rendering takes too long, which slows down the application's overall speed.
I want to add lazy loading so that when the user clicks on expand option, the children of that row should get added dynamically from my data.
I am referring to this example Lazy loading in this example the children data is being fetched on click is randomly created there is no hierarchy to maintain.
In My case data is already there I want to fetch children of that particular row when the user clicks on expand row button.
In summary, how can I get the children's row when the user clicks on the parent row?
I am attaching a link My Implementation to code sandbox where I created react table with static data.
Let me know if i am missing anything or you need more details. Thank you
Beta Was this translation helpful? Give feedback.
All reactions