Replies: 3 comments
-
Can you help me understand what is your use case for using a proxy? |
Beta Was this translation helpful? Give feedback.
-
The row at index i is indeed created every time rows[i] is called. I also thought about lazily create the rows and store them until there is a change, but I was worried about the memory footprint, but I suppose if the user would scroll until the end of the table, unless the scroll is slow enough, few rows are actually accessed (an other use of the Proxy would be to call a rest API when needed in case there is to much data, like more than 1M rows, so in this case, I really don't want to store references to 10M rows for example...) |
Beta Was this translation helpful? Give feedback.
-
That's fair. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Since v7.0.0-canary.8, the rowGetter prop which was a nice way to feed the displayed data in a virtualized table has been replaced with the rows prop.
One way to keep the same kind of functionnality was to use a Proxy which would overload the [] operator, so preparing for a future migration that's what I used and it worked.
Unfortunately, after migrating from v7.0.0-canary.7 to v7.0.0-canary.33, it is impossible to edit any cell using a proxy, the problem being the following line :
react-data-grid/src/DataGrid.tsx
Line 871 in ad691c0
replacing with something like this is working though:
Beta Was this translation helpful? Give feedback.
All reactions