This is a migrated thread and some comments may be shown as answers.

Listview Reorder - didselectItemAtIndexPath calling twice

1 Answer 78 Views
ListView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Thomas
Top achievements
Rank 1
Thomas asked on 21 Sep 2016, 09:10 PM

Hi,

I have a list with some items and it is possible to reorder those items (using the default handler) or to activate them by clicking on them (active item changes its background color).

Now I am facing a problem when dragging those items over each other bcz sometimes the didselectItemAtIndexPath is called twice (once when the dragging begins and once when the dragging is done - when I drop the item). The problem is that this behaviour is not consistent and I cant catch it. First I thought that didselectItemAtIndexPath is being called always just on start so I set the active back on its previous state inside willReorderItemAtIndexpath, but when, sometimes, it is being called after the reorder is being done, it messes everything up.

 

Whats the reason that the didselectrowatindexpath is being called after the reorder was done and how can I prevent that from happening? (I tried it also with your example application by just putting a log inside didselectItemAtIndexPath and in happens there too).

If its not possible to prevent that, is there a possiblity to distinguish between a reorder and a normal click  - somehow do identify that I am on the "reorder handler) ? (actually when I think about that, I guess even if it would be possible it wouldnt help me bcz that last didselectItemAtIndexPath is being called after the reorder is done ...)

 

Regards

 

 

1 Answer, 1 is accepted

Sort by
0
Miroslava
Telerik team
answered on 26 Sep 2016, 01:10 PM
Hello Thomas,

Thank you for contacting us.

I was able to reproduce the issue and I confirm it. I logged it in our feedback portal. You can use the following link to track the issue status. I updated your Telerik points accordingly. 

If you need further assistance, do not hesitate to contact us. 

Regards,
Miroslava
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
ListView
Asked by
Thomas
Top achievements
Rank 1
Answers by
Miroslava
Telerik team
Share this question
or