Changed order of items on refetch
onBlur data post to the server and onSucces refetch occurs, the order of the item changes. How to eliminate this?
Data from the backend is sorted by ID and in Insomnia it always comes back in order.
Inputs are given an individual key, specifically {info.cell.id} from react-table. Columns is in useMemo, data to table is not.
6 Replies
optimistic-gold•3y ago
The video doesn't seem to play for me. Can you paste the code here or provide a link to a github repo or sandbox?
judicial-coralOP•3y ago
Sorry for some polish variables and classNames. It is just prototype. I uploaded short video to youtube showing behavior: https://www.youtube.com/watch?v=3ebgENY3cWM
judicial-coralOP•3y ago
Code before: https://textdoc.co/QMDmHAaN3bUg46wX
Textdoc - Create, Edit, Share and Save Text Files
A secure web app that allows you to create, edit, share and save text files to your device or to Google Drive as an editable Doc
judicial-coralOP•3y ago
Code after: (working) https://textdoc.co/OxZ7SwLKmdUIjJRe
Textdoc - Create, Edit, Share and Save Text Files
A secure web app that allows you to create, edit, share and save text files to your device or to Google Drive as an editable Doc
judicial-coralOP•3y ago
ok this is a bit strange. I got rid of the BasicTable component, I now return the tables directly in the Table component and everything works as expected. I also tried sorting the data, but it's not a good solution. Code above.
optimistic-gold•3y ago
Is the data rendered in the order it's sent from the server? Why is sorting the data not a good solution?
Also the video is like 90% black so we can't really see what's happening.