Hello,
this issue might be related to my previous issue
I try to implement the selection behaviour for our app, where the user needs to select only the first item with LongPress, then the user can select/unselect the items with a short tap.
The scenario works perfectly on Android, but I have some trouble on iOS again. When the user is in selection mode (he has selected at least one item) and he taps on one item, I check if the item is already selected.... and if so, I deselect the item this way: args.object.deselectItemAt(args.index); . I would expect, that deselecting an item this way would make the listview raising the itemDeselected event, where I want to remove the 'selected' CSS class of the even deselected item. That does not happen on iOS, but it is perfectly working on Android.
This is what I am doing:
exports.onItemTap =
function
(args) {
if
(vmModule.vmMain.get(
'selectingItems'
)) {
if
(args.object.isItemSelected(args.object.getItemAtIndex(args.index))) {
args.object.deselectItemAt(args.index);
}
else
{
args.object.selectItemAt(args.index);
}
}
else
{
alert(
"Tap on item "
+ args.index);
}
};
exports.onItemSelected =
function
(args) {
/*item has been selected, enable selection mode if not already active*/
vmModule.vmMain.set(
"selectingItems"
,
true
);
};
exports.onItemDeselected =
function
(args) {
if
(args.object.getSelectedItems().length === 0) {
console.log(
"no items selected anymore.... leaving selection mode"
);
vmModule.vmMain.set(
"selectingItems"
,
false
);
}
};
Please tell me if you are able to reproduce this issue using my extended sample project and if this is a bug in the iOS RadListView or if it's a wrong usage of the functionalities on my side.
Best regards and thank you in advance