vm.caseRecords.remove(function (item) { return item.AppealStatusCd == vm.selectedAppealStatusCd() });
上述语句确实会从caseRecords observableArray中删除项目并对其进行更新。如何获取被删除的元素?
答案 0 :(得分:1)
remove
的结果是已移除的项目,因此您只需说:
var removedItems = vm.caseRecords.remove(function (item) { return item.AppealStatusCd == vm.selectedAppealStatusCd() });