SwiftReorder icon indicating copy to clipboard operation
SwiftReorder copied to clipboard

Issue when reorder a item to the top

Open mink-lparrouy opened this issue 5 years ago • 6 comments

Hi there,

I have an issue when I have a long list of items and I want to reorder the list. I take my last item and I want to put it on top but the scroll seems infinite.

Checkout this video : http://sendvid.com/rnqf5s1k

Do you have any idea of what happening ?

Thank you

mink-lparrouy avatar Mar 26 '19 10:03 mink-lparrouy

@mink-lparrouy

same behavior here .... found a solution for this?

kind regards,

Mike

afMicWeg avatar Apr 15 '19 20:04 afMicWeg

Hi @afMicWeg

I work with @mink-lparrouy, sadly we didn't find any solution as of now...

Regards

AndoniLarz avatar Apr 16 '19 14:04 AndoniLarz

Hi, any news on this ?

AndoniLarz avatar Jun 12 '19 15:06 AndoniLarz

I just implemented this library and don't have this issue. I did have an issue with internal consistency that I fixed - it was my code of course not the library. In troubleshooting, I found it helpful to put a breakpoint on line 55 of ReorderController+DestinationRow.swift

This is where the reordering is done, and the state is aware of the source and destination indexPaths.

You might try putting a breakpoint there and seeing what is happening when the cell gets to the top of the page.

You also might double check your TableViewDelegate and TableViewDataSource methods to make sure your code is clean, segmented and if there is anything non-standard or funky in there that might cause the issue. If you want to post your code.. or even better open a PR with a new example reproducing the issue this would make this issue move much faster.

thejeff77 avatar Jul 26 '19 13:07 thejeff77

Hi friends, getting same issue as you mentioned. Issue when you attempt to drag the last cell all the way to the top of the list. We are only able to put it as third item. Unable to set as first item. //In a quick debug, understand that the top cells are not getting with visible cells array.

I have created a sample project to replicate the issue. We put another view(segment control) on top of the table view. Set the number of cells as 20, given cell height as 120. https://github.com/davidpaul0880/TableViewReorder-Test

The issue getting, because we added a view (segment control) on top of tableview.

davidpaul0880 avatar Aug 01 '19 05:08 davidpaul0880

FYI: I replaced my TableView with CollectionView to get a decent reordering.. :)

davidpaul0880 avatar Jan 02 '20 10:01 davidpaul0880