Listview Reorder - didselectItemAtIndexPath calling twice

2 posts, 0 answers
  1. Thomas
    Thomas avatar
    27 posts
    Member since:
    Jul 2016

    Posted 21 Sep Link to this post

    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

     

     

  2. Miroslava
    Admin
    Miroslava avatar
    19 posts

    Posted 26 Sep Link to this post

    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
  3. DevCraft banner
Back to Top