-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First drag and drop resets position #80
Comments
Issue seems to only persist when I track Passing items in |
I have figured out a workaround. Instead of using 1 collection I am now using 2, one for the data displayed in component and the other one to handle the actual data updates.
|
This now presents an issue on save, somehow its unable to keep track of all the changes I make (both position and zone) so it does not update all the affected rows correctly. Any advise would be well received. |
I am experiencing the same issue. On my OnDrop event, I am updating my collection to indicate that the item has been moved. I am patching the new position and other details, and the underlying data in the collection is correct. However, like iozm, my tiles keep getting automatically re-sorted after I move them. Is there some way to prevent any sorting behaviour and let the items stay where they were dropped? This was working previously, but now it is not. |
UPDATE: This behavior seems to be related to the existing number of items in a particular space and whether there are existing items in the slot you drag an item into. For example, let's say I have items 1, 2 and 3 scheduled for John Smith on Thursday. If I re-order the items within this resource/day slot, there are no issues with sorting. I can also move some or all of the items to a different resource/day slot with no existing items, and there are no issues sorting. E.g., if the original number of items is three, and I only deal with those items, sorting works correctly. Now, let's say I have Item 4 scheduled for John Smith on Friday. If I move one of the three original items (say, Item 1) to Friday, I am unable to make Item 1 display as the first item of the day slot. It automatically shuffles Item 4 to the top. It's like the problem occurs if you are mixing items from different originating day slots. If anyone else has encountered this and has suggestions, please let me know. I can't implement the work-around of using a different collection because I need my moved items to be patched to indicate visually that they have been moved. |
You might need an issue on your own cause this is not the case for this issue, I am having the behavior in both scenarios, only position has changed and both position/zone changed. |
I'm not sure if this is a true issue or maybe just something I am doing wrong.
Scenario:
I have 3 drag and drops to manage priority of tasks. The objective is to be able to manage the priority of each task by high, medium, low values but also to track its position and set up a number value for an internal priority within the priority. So I am tracking both position and zoneid. Sorting is set up to follow index.
All three zones are tied to the same collection. On drop event of each zone I check if the item has either changed position OR zone
PowerDragDrop_High.CurrentItems, HasMovedPosition = true Or HasMovedZone = true
If true, I update the collection with the zoneid value and the position value.
Issue:
The first drag and drop does not register fully in
CurrenItems
property. However the change is reflected in the collection. Repeating the move makes the changes stick in theCurrentItems
property. (i.e. I switch item in position 1 to position 2, the component re-renders the sort how they were before the drop).OnDrop property of master component
ForAll( Filter (PowerDragDrop_High.CurrentItems, HasMovedZone Or HasMovedPosition) As HighPriorityItem, Patch( colAIIdeas, LookUp(colAIIdeas, Text(new_aiidearegistryid) = HighPriorityItem.ItemId), { new_ideapriority: HighPriorityItem.Position, new_prioritytext: HighPriorityItem.DropZoneId, Edited: true } ) );
The text was updated successfully, but these errors were encountered: