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
2
votes
2 answers

Knockout js Computed not being fired

The code can be found on http://jsfiddle.net/6kMWM/10/. In the FilterViewModel I am creating an observable object. var FilterViewModel= ko.observable({ Name: ko.observable("test"), Code: ko.observable("test"), Number:…
Moddinu
  • 185
  • 1
  • 7
2
votes
1 answer

ko.computed with passed argument shows function, but not a value

My task is to dynamicly form "href's" for links, each time an attached observable is changed. Here is the link for an example: JS Fiddle example link I've met two problems when achieving this: when i try to pass some string + computed observable, i…
Kamilius
  • 588
  • 14
  • 34
2
votes
2 answers

Knockout computed bool value not updating

Here's a simple viewmodel: var vm = { isValid1: ko.observable(false), isValid2: ko.observable(false), isValid3: ko.observable(false), isValid4: ko.observable(false), isAllValid: ko.computed(function() { …
Nicolas
  • 356
  • 1
  • 5
  • 17
2
votes
1 answer

knockout 2 fields binding each other

This is my first post here after trying to google an answer. If this had been answered somewhere before then if you could help directing me to right place that would be great. I am trying to figure out a way to do 2 way binding between 2 fields. I…
Tom Koston
  • 35
  • 5
2
votes
3 answers

Remove a property from knockout viewmodel

I'm just wondering how to remove a property from knockout viewModel. Specifically, a computed one. I have a simple viewModel function viewModel(){ var self = this; self.name = ko.observable("John"); self.lastname = ko.observable("Doe"); …
Overmachine
  • 1,723
  • 3
  • 15
  • 27
2
votes
3 answers

Kendo DataSource: How to define "Computed" Properties for data read from remote odata source

Situation: kendo DataSource var ordersDataSource = new kendo.data.DataSource({ type: "odata", transport: { read: { url: "http://localhost/odata.svc/Orders?$expand=OrderDetails" } }, schema: { …
Dean
  • 1,281
  • 3
  • 15
  • 23
2
votes
2 answers

JQuery Knockout ComputedObservable Write not getting called for ObservableArray

I am trying to bind a computed observable which internally uses a observable array. The "read" method does get called while loading. But the "write" method does not get called when the values in the table are changed and the focus is moved. Note…
2
votes
4 answers

Knockout.js writeable computed boolean observable bound to checkbox - unreliable property setting

I have a checkbox which previously was bound directly to an observable property on my view model. I use a generic dirty flag on all view models which watches all observable properties on the view model for changes. Now for one property I wish to…
Tom W Hall
  • 5,273
  • 4
  • 29
  • 35
2
votes
1 answer

Knockoutjs computed won't recalculate after update

I'm working with an observable array of "Parts" that contains an observable of "Vol". I currently have the volume of each part as well as the total amount displayed. When the application starts the total amount is added correctly. However, when I…
2
votes
1 answer

jqx grid and knockout computed column

I'd like to have a simple jqxGrid with computed column. Looks like everything is ok, but it doesn't work. Simple example: