Closed DannyWheeler closed 2 years ago
I have also noticed that sometimes the loading placeholder is displayed for all rows, not just the last two:
This is with the codesandbox example provided above, same steps to reproduce.
Hi @DannyWheeler,
Thank you for your interest in our React Grid! I couldn't reproduce this issue. I set `MAX_ROWS' to 252 and tried to scroll the table with and without React DevTools. Sometimes I see the loading state, but in a couple of moments, rows are loaded. Is this the only change you have made?
Also, I couldn't open your example (https://90luq.csb.app/). Could you fork my example to reproduce the issue? If so, could you describe the order of your actions?
Hi @LazyLahtak, thanks for your response.
I've forked your example as suggested and was able to reproduce the issue again. I'm not sure what happened to my original example but here is the latest: https://codesandbox.io/s/hungry-ptolemy-1jwmm
And here is a screenshot of the reproduced issue in the above fork:
My exact steps were:
As you can see from the console in the screenshot, the last action was UPDATE_ROWS with a payload containing skip 150 and rows having an array of 50 elements. At the point of scrolling to the end of the grid I would have expected another START_LOADING action to be fired to get the last remaining 2 elements.
Thank you for the clarification. I reproduced the issue.
I'm using ...
Current Behaviour
When using VirtualTable with infinite scrolling and remote data I am intermittently seeing the last results remain in the loading state (showing the placeholder background image) when scrolling to the end of the list.
It seems to happen more frequently when I have developer tools open and am inspecting one of the table elements.
Expected Behaviour
The data for the last rows are shown.
Steps to Reproduce
Link to the example that reproduces the issue: https://codesandbox.io/s/vigorous-carson-90luq (forked from the example here: https://codesandbox.io/s/r92eo)
As this is intermittent it is difficult to produce exact steps to reproduce. However it is basically a case of scrolling from the top of the list to the end, sometimes repeatedly, to see the issue.
I am testing without the codesandbox editor inline (e.g. https://90luq.csb.app/) with developer tools open.
Please note that the only changes to the example I have made are to set MAX_ROWS to 252 and add a console.log in the reducer to see the actions.
You can see from the screenshot below that the last UPDATE_QUERY action has a payload with skip=200&take=50 even though I am scrolled to the end of the list, where I would expect to have another UPDATE_QUERY with skip=250&take=2.
Screenshots
Environment
The example I've provided is forked from the offical demo here: https://codesandbox.io/s/r92eo
I can reproduce the issue here: https://90luq.csb.app/
I have a hunch that having developer tools open makes the issue more frequent.