I have a spark datagrid on a mobile application, I set the
interactionMode="touch"
and the dataGrid scrolling is good, I got some problems adding a selectionChange eventListener to it, because scrolling the dataGrid will automatically change the selection and instead simply scrolling it, the function binded will start…
How can I add the touch dalay before select the index, so if I scroll the grid the selection won’t change, and it change only if I press the item without scrolling?
I solved using a workaround….
Instead adding the
selectionChangeeventListener, I used themouseUpandmouseDownto check the time between click and release, and if the release time is less than click plus some dalay, I return the selection otherwise not…EDIT:
I also added the check on mouseX and mouseY position, now the grid dispatch the selectionChange if the time before release and the change of position is less that the default dalay (time/pixel)…