Sounds like it should be a common problem, but I couldn't find any info on it.
Setup:
I have a paginated list of items; each item has a remote: true
"Delete" button
, so any item can be removed with a remote
ajax request.
Problem: Once you remove a number of items on the first page, going to the next page will result in you missing a number of items.
E.g. for 30 items with 10 items per page, removing 2 items on the first page and going to page 2 will result in you seeing items #12-22. (Because items 10-12 are now displayed on the first page in place of the once we've just removed.)
My current thoughts on it is to append the next item to the end of the list every time an item is removed, so that we always have 10 items per page, but I'd love to know if there's a better/simpler way of handling this problem.