inventaire / inventaire-client

webapp coupled to the inventaire server :books:
https://inventaire.io
49 stars 16 forks source link

Paginate listings #371

Closed jum-s closed 1 year ago

jum-s commented 1 year ago

Mainly inspired by PaginateItems and ListingsElements An inconvenient with this implementation: if a new listing is created (by someone of your group) while you are scrolling, Svelte will throw a no duplicate key error (since the offset will be wrong and fetchMore with return an already fetched listing), which could be handled by turning listings into an object and Object.assign(newListings) to it. I dont think its worth the effort, but that's a notable advantage of using objects over arrays. Note that this would not happen with a cursor based pagination.