Replies: 2 comments 5 replies
-
hey @dz3n why not change the order on the display side? See documentation here: https://react-uploady.org/docs/api/utils/getUploadPreviewForBatchItemsMethod/ Will look something like this: import { getUploadPreviewForBatchItemsMethod } from "@rpldy/upload-preview";
const useMyCustomItemsRetriever = (cb) => {
useBatchAddListener((batch) => {
cb({ items: batch.items.reverse() });
});
}
const MyUploadPreview = getUploadPreviewForBatchItemsMethod(useMyCustomItemsRetriever);
//... render <MyUploadPreview/> instead of the default <UploadPreview/> |
Beta Was this translation helpful? Give feedback.
-
Hey @dz3n I looked into this and it seems a bit more complex to solve than I initially thought. I'd like to understand your flow better to see if there's something else I can do or advise on your end.
Why is it different from the order of items added on the client? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm trying to reverse the batch in order to keep it on the previewComponent in same order as I store it in database.
I used this event, and it works, but now the uploading start from right to left which is kinda annoying.
Can I use different approach to achieve this or to fix the uploading to start again from the first (left) item
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions