Open redowl5 opened 3 years ago
Can you please add a permalink to the relevant line in the relevant markdown file instead of a screenshot?
Not sure how to? But the relevant line is
"After a drag operation you can inspect your list to get the current position of items."
The permalink is
FYI: You can find these in case of markdown file by opening the file in the browser via https://github.com/Postlagerkarte/blazor-dragdrop/blob/master/README.md, click Display as source, click the relevant line, click on the ... menu, click Copy Permalink.
Did you set InstantReplace to true?
Afaik only in this case the items are changed automatically.
I didn't know that was an option having not seen it in any of the examples. I've now added that but it's still not quite working, I can see the item moving and the UI updating but when I release the item list reverts to the original order.
Then you most likely did not setup the Accepts property correctly, right?
How do I use that? Do you know if there is an example?
Thanks for your help
Although not following how this helps with inspect your list to get the current position of items after a drag operation?
The idea is to let the component change the items collection and then you can take the changed order and persist it or something like that. Perhaps I did not understand your initial question correctly, it is somewhat vague.
How do you take the changed order? I can't see how I do this, that was my original question. Do you inspect the list that you passed to the Items property as we've tried that and can't see any changes to it.
Thanks again for the help.
For a possible solution have a look at the demo page ReplacedItem
. Set a breakpoint in OnItemDrop
and OnReplacedItemDrop
to see how the fields DropedItem
and replacedItem
are changed.
Thanks!
Can we close this?
As stated in the docs, how do you inspect the list to get current position?
I'm inspecting the item collection I passed in as Items and they do not get changed?
Thanks for any help