【发布时间】:2020-04-01 23:54:39
【问题描述】:
nativescript 中 RadListView 的 documentation 表示 itemSelecting 事件“可用于取消操作”。这种行为将如何实施?我正在尝试限制通过此方法选择的项目数量。我已经实现了事件方法,并尝试简单地取消选择该项目,但这不起作用,而且我觉得效率很低。
onItemSelecting({ index, object }) {
if (object.getSelectedItems().length >= maxSelectedItems) {
object.deselectItemAt(index);
}
}
【问题讨论】:
标签: javascript vue.js frontend nativescript mobile-development