This is absolutely fantastic and works exactly as expected! Itâs saved me a huge amount of time prototyping a drag and drop layout.
I would really like to have an âemptyâ state for each list. It should have the following properties:
It will allow items to be dropped onto it
It cannot be dragged
It is only visible if there are no (other) items in the repeater
It is styled differently (I know how to achieve this)
I have two hypotheses of how I might achieve this:
Have an âemptyâ repeater item in each list. Every time the repeater get updated, a filter hides this item if repeater.itemCount > 1.
Have an element outside of the repeater act as a drop zone. Anything dropped here will be added to the repeater. The order itâs added to the repeater doesnât really matter as the repeater will always be empty when items are dropped here. This can be placed behind the repeater, at the same size as a repeater item, therefore only being visible when the repeater is empty. It will need to be grouped with the repeater somehow to allow multiple lists each with a repeater and a drop zone.
Either could work. I think second approach seems easier. You could set it up in a dynamic panel, where State1 is your drop zone and State2 is your repeater.
wow this is great and so useful for me since Iâm trying something similar but maybe a little more complicated as a newbe.
would this drag and drop reorder functionality between two list also be possible with some more rows opening up by accordion? Lets say sub items? I mean those rows are hidden if accordion is closed but they should be copied between lists and reordered together with their parent item.
ok copying is now done. now focusing on reordering. For that I would love to have the highlight effect while dragging an item over another item.
In general I got it working, but seems to be not working for repeaters which are nested in a scrollable dynamic panel.
it was not intended to do as mentioned here?
@pdcdec or @mnearents do you have any idea how to solve that?
Here is your example with a scrollable DP at the left. Scroll down a little and the highlight effect dowsnât work properly anymore
Thank you for pointing this out.
Youâre right, the component works only if the DP is not scrolled. It doesânt take into account the Y offset of the scrolled DP.
I guess the solution is to use the âscrollYâ property of the parent DP (or the parent DPs).
At the moment, Iâve no time to check this further (sorry), but it should not be too complicated.
Thank you for your help. Got it working with a second Ghost widget which is hidden with a y offset of scrollY. This widget is used within the mini_row_sensor instead of the first ghost widget which is now only for visual appearance
Just to reiterate how useful this has been for me too, thanks Phil @pdcdec .
Two things Iâm trying to add:
To change the cursor when I hover, about to drag, so the user has a good idea that they can drag (I hope Iâll be able to work this out for myself but so far, adding events to dp_ghost or the repeater items hasnât worked)
And the thing I am sure I wonât be able to achieve - having nested draggable items:
E.g.
Peter
** Peterâs thing one
** Peterâs thing two
Jane
** Janeâs thing one
** Janeâs thing two
So I could move Janeâs things up and down within âJaneâ (NOT into Peterâs things) but also I could move Jane and her things above Peter and his things.
You canât nest repeaters of course so the repeater items would have to have some understanding of child items. Sounds tricky to me!
This thread has been really helpful for me as an Axure newbie. I do have one question, thoughâis there a way to do this without drag and drop? I have a repeater with a menu in each row that has âmove upâ and âmove downâ options. When you hit âmove up,â it should move up one spot, and when you hit âmove downâ, that item should move down one spot. I canât figure out a way to do this.
Hi guys!
A quick update to simplify the way the overlay effect is handled. Now I simply use show/hide instructions. Originally I used a column called âoverlayâ in the repeaters and Iâve noticed some âfreezingâ with several long repeaters.