In a spark list I could use the change
event to find out which item has been selected or deselected.
The dispatched IndexChangeEvent
object has the properties newIndex
and oldIndex
holding this information.
But with multiple selection allowed this doesn't work anymore because newIndex
and oldIndex
could refer to indices of still selected elements.
A solution would be to copy the selectedIndices
vector to another variable and compare this variable with selectedIndices
after a change in selection, but this seems to be somewhat complex.
Does anyone know if there is an easy way two get the index/item a user is deselecting while other elements are still selected?