Skip to main content

All Questions

0 votes
1 answer
44 views

Using knockout extenders to return data not tied to the underlying observable?

I am trying to add default sorting to an observable array. However, I don't want it to apply to the underlying observable. Just return the array as sorted without affecting the extended target. I have ...
SventoryMang's user avatar
  • 10.4k
0 votes
1 answer
35 views

How to update object attributes values in knockout.js at once

How to update object attributes values in knockout.js at once the way i do is one by one like the example here self.person = { id: ko.observable(), name: ko.observable() }; self.person.id("1&...
MOz's user avatar
  • 39
0 votes
1 answer
121 views

Is there a function in Knockout.js to build an object from a data-bind attribute string?

I tried to run JSON.parse($("input").attr("data-bind")) but it throws an error. Is there something similar in the Knockout library that I could somehow use? I would like to ...
Ryan Penfold's user avatar
1 vote
0 answers
83 views

knockout: unable to update the observable array in knockout while binding to table

I am having two tables. In one table(parent table) I have options to add and delete rows in that one column is a dropdown column. based on the selection I need to load another table(child table) with ...
prakashrajansakthivel's user avatar
1 vote
1 answer
204 views

UI is not updated by updating observable from the custom binding method update

I'm working on a knockout application in which there is a drop-down for selecting a day of a month, it's values changes as per the month selection (ex: May- 1 to 31, Nov- 1 to 30), I successfully ...
UserDev's user avatar
  • 13
0 votes
1 answer
107 views

Knockout JS writable computed value doesn't fire another computed value when writing function is used

I use Knockout Js for a few months. But I stuck on a problem. I have 2 view models. One is the whole bill view model who has the subtotal of the bill and the taxes with the grand total. A part of the ...
Sylvain Racine's user avatar
0 votes
1 answer
196 views

Is there a way to asynchronous initialize a Viewmodel (KnockoutJS)

I want to asynchronous initialize a ViewModel. I don't mean asynchronous load the ViewModel, that I have managed (see the code below). The ViewModel will be loaded asynchronously one time. After that, ...
harry's user avatar
  • 1
1 vote
1 answer
137 views

Behavior Subject Knockout Observable Performance

I'm working on a project where I have a singleton running across the application. This singleton offers an observable that view models can subscribe to. Upon subscription the subscriber should get the ...
benh80's user avatar
  • 548
2 votes
1 answer
400 views

How to pass an item from knockout foreach to partial view as data-bind?

I have a table with the list myListB() of objects, which are displayed by knockout foreach making as many rows as myListB().Count. <!--ko with: myProperty--> <table class="table"...
David Shepard's user avatar
1 vote
1 answer
37 views

view does not update - css class missing

When I press the "Update" Button I see the alert with the correct value (true/false) but the class "done" wont get applied. Why does the view not update? <div data-bind="...
webGuy's user avatar
  • 153
0 votes
0 answers
296 views

Loading Angular component in a Knockout application - Angular elements

I am trying to add a Angular web component in a KnockoutJS application using Angular elements. Following this method of creating individual elements - "Angular Elements — A Practical Introduction ...
curious_debugger's user avatar
0 votes
1 answer
38 views

Why did changing this formatting function in this way, cause the Knockout binding to start working?

I have an element on a page, like this: <span data-bind="text: FormattedCountOfPeople"></span> And the function that calculates it I first wrote like this: self....
Caius Jard's user avatar
  • 73.8k
1 vote
1 answer
45 views

Knockout.js : What is the best way to trigger a calculation when a value in observable arrray changes

We have an observableArry of objects that contain observable properties (description, quantity, type). These are maintained in a global list - call them supplementary items. These items can be added ...
julianH's user avatar
  • 119
0 votes
0 answers
50 views

Typeahead in the templates empty function - event doesn't work(Knockout.js)

I would like to add the custom event in the empty function from empty results. Here is an example code. ,templates: {empty: 'No results' + '<a data-bind="click: event">Go</a>', ...
siuri's user avatar
  • 191
0 votes
1 answer
63 views

Need to bind foreach and custom attribute to same div

I have a requirement to bind foreach and one custom attribute(data-tabs-slider-number) to same div using knockout js. I tried like below <div data-bind="foreach:{$root....
user2395176's user avatar

15 30 50 per page
1
2 3 4 5
24