Megabit / Blazorise

Blazorise is a component library built on top of Blazor with support for CSS frameworks like Bootstrap, Tailwind, Bulma, AntDesign, and Material.
https://blazorise.com/
Other
3.32k stars 535 forks source link

Dropzone: Reordered property to expose current order #5834

Closed tesar-tech closed 2 weeks ago

tesar-tech commented 2 weeks ago

Closes #5830

https://github.com/user-attachments/assets/a91132c5-6438-446f-a4a1-eeb71b3f94cf

This function triggers every time the order changes:

While removing and adding items isn’t technically reordering, I believe these actions should also trigger the function.

Currently, it also fires when a user drags an item and drops it back in the same position. While this doesn’t alter the collection, the function still invokes. We could compare the old and new dictionary to prevent this, but is it worth the additional complexity?

mkontula commented 2 weeks ago

@tesar-tech From the my perspective adding and removing items for example from zone "all options" to "selected and ordered options" is a reordering since you can drop the new item in any position in "selected and ordered options". Also when you remove an item from "selected and ordered options", you would expect the "selected and ordered options" internal and exposed order to be coherent and without gaps.

stsrki commented 2 weeks ago

Got some more ideas and added dropzone names to the DropZoneOrder as I think it will be useful to the users. Please review.