Quote:
Originally posted by quant
this is not as easy as it might look, cause by deleting an item, you could delete the one that preceded it, or followed ... or many more ... if they were down the tree of the deleted item.
|
A bit of effort but not that hard.
Usually, when we delete an entry in the middle of a flat list, the lower entries move up one row and focus shifts to the entry that was just below the deleted one.
Before delete, we have search result (A) associated with an indexed array
User deletes item
Re-run query to produce search result (B)
Focus closest next entry...
Iterate down indexed array (A), starting from the item that was just below the deleted item, looking for a match in search result (B), then focus that item. When finished, free indexed array (A). If matching item not found, simply leave the first item in search result (B) focussed.