Force a computed property function to run

后端 未结 5 1550
鱼传尺愫
鱼传尺愫 2021-01-30 15:29

Given a computed property

vm.checkedValueCount = ko.computed(function(){
  var observables = getCurrentValues();  //an array of ko.observable[]
  return _.filter         


        
5条回答
  •  攒了一身酷
    2021-01-30 16:11

    There is a method to force recalculation of all observables depending on yours:

    getCurrentValues.valueHasMutated()
    

提交回复
热议问题