Questions tagged [computed-observable]

A computed observable is a synchronously updated value based on other observables; if they change so does the computer observable, immediately. A term frequently used with Knockout.js.

A familiar computed observable would be a cell in a spreadsheet that contains the sum of a column. If any of the cells in the column change, the sum is immediately updated.

Reference: http://knockoutjs.com/documentation/computedObservables.html

132 questions
0
votes
1 answer

Filtering observableArray

I have troubles with filtering observable array with knockout.js my js: Array containing data var docListData = [ { name: "Article Name 1", info: "Authors, name of edition, publishing year,(moreinfo?)", checked:ko.observable(false) }, {…
0
votes
0 answers

why doesn't the handlebars template reflect change in ember property

i'm having some trouble with the handlebars template not updating every time the contents of this component's 'subAllocations' change. it does change the first time the event is triggered ie adding or removing subAllocations, but not after that,…
0
votes
2 answers

Knockoutjs computed variables from json filled data

i'm currently experimenting a bit with knockout and javascript in general but just hit a problem I can't solve. I have a viewmodel with several (simple, since this is just for testing) sub VMs and one of them has a computed variable which should…
0
votes
1 answer

Will ember leak memory if I create a Model in a computed property?

I'm creating a "scrambler" that takes in a text array and an image array, then computes the cross product as tweets. The function that I'm worried about looks like this: combinations: (-> tweet_texts = @get('tweet_texts') tweet_images =…
spinlock
  • 3,737
  • 4
  • 35
  • 46
0
votes
2 answers

How Knockout computed observable register to the relevant observables?

When we declare a computed observable in Knockout, all we have to do is to pass a function that will update this computed whenever one of the observables this function contains gets updated. Example, from the Knockout documentation: function…
xlecoustillier
  • 16,183
  • 14
  • 60
  • 85
0
votes
2 answers

Generate binded HTML in knockout computed observable

I have the need to generate the content of an element dynamically. This would be fine if I just needed text. I could just use a computed observable to build the string. The part I'm struggling with is that I need to output some links as well. I'd…
LordZardeck
  • 7,953
  • 19
  • 62
  • 119
0
votes
1 answer

Knockout: Writable computable observable update each other

I have a case where I need to do the following. Selecting employment type will trigger default monthly salary and yearly salary. UI: and catching value updates with a parameter Knockout
I'm using Knockout JS, and I'm trying to create a simple UI where a series of dropdowns are used to fire an action that is dependant on the value with a parameter. e.g. if I have a page that gives details of two vehicles and I want to assign them to…
ec2011
  • 570
  • 6
  • 20
0
votes
1 answer

Is there a way to modify requested data on ajax call?

I have a knockout script that loads the data from the server via ajax and outputs this information into the model. If to simplify everything, my model looks like this: function ArticleViewModel() { var self = this; this.articleInfo =…
Salvador Dali
  • 214,103
  • 147
  • 703
  • 753
0
votes
1 answer

Knockout viewModel Property

I just can't get this to work after trying hours' worth of ideas. Simple need: I have a textbox (INPUT type TEXT) and a Div tag:
Ideally, all I…
Jazimov
  • 12,626
  • 9
  • 52
  • 59
0
votes
1 answer

How to access ko.computed method of an observablearray in knockout js

self.work_days = ko.observableArray(); self.work_days().push(new WorkDayVM({}, new_date))//new_date is the date supplied from the form function WorkDayVM(data, day) { var self = this; self.in_time1 = ko.observable(); self.out_time1 =…
0
votes
1 answer

KnockoutJs observable array via computed observable with throttle

I have an issue where I have an underlying observable array, which is sorted and exposed via a computed observable. Although I now have an issue where if I throttle the computed observable it seems to cause an issue when calling removeAll on the…
Grofit
  • 17,693
  • 24
  • 96
  • 176
0
votes
1 answer

How to add an additional array item to a computed observable at runtime

I am trying to append an additional value to a knockout computed observable with no luck. Hopefully someone can point me in the right direction. Currently I am iterating through a collection of fields and building an array of dates //extract Primary…
rlcrews
  • 3,482
  • 19
  • 66
  • 116
0
votes
1 answer

Why does the following Ember.js code not update the given list?

I've been trying some things with ember and my latest test was to update a list based on external event. I have been given some other solutions but the one I came up with (which does not work - for reasons unknown to me) is: jsBin If anyone could…
Jason
  • 4,034
  • 4
  • 40
  • 62
0
votes
1 answer

Issues with Knockout computed

I have a computed observable: passengerDocs.passengerDocsViewModel = function () { var self = this; self.isFunctionsDone = ko.observableArray([false, false, false, false, false, false, false]); self.IsCompleted = ko.computed(function () { var…
Guy Z
  • 683
  • 3
  • 8
  • 24
1 2 3
8
9