pqina / filepond

🌊 A flexible and fun JavaScript file upload library
https://pqina.nl/filepond
MIT License
15.16k stars 825 forks source link

Disable item sorting when dropping new file #223

Closed BobD closed 5 years ago

BobD commented 5 years ago

Hi there,

I'm using Filepond for a project and it works pretty great so far, thanks. One feature i could really use right now is disabling the sorting of items when dropping files. Our backend doesn't support adding additional metadata at the moment so i can not persist the sort order.

Simply dropping a new file on top of the list without additional sorting enabled would be perfect, is that something which could be done perhaps?

rikschennink commented 5 years ago

Do you mean not allowing the user to drop it in the list at a specific location?

BobD commented 5 years ago

Hi Rik,

Thanks for the response, yes exactly. Perhaps i am overlooking an option, i already tried the sort() and itemInsertLocation() options but those do not seems to prevent this behaviour.

I am using the React component by the way, not sure if that matters in this case.

rikschennink commented 5 years ago

Adding it now 👍

rikschennink commented 5 years ago

Added itemInsertLocationFreedom in version 4.1.0, set to false to stop users from picking drop locations. Can you confirm this works.

BobD commented 5 years ago

@rikschennink that's great. Works like a treat, thanks!