Closed ballwood closed 9 years ago
From a quick look I assume its because you are passing back a computed, and generally computeds are seen as read only values so they are ignored, assuming this is the case I am not sure how to work around it as you need to be able to tell if a computed is writeable and I believe knockout only exposes isComputed
... also your 2nd property should match the vm property name (incorrect
) not value
, If I get time later I will take more of an in depth look.
Change the giant if that wraps everything at the top to:
if (ko.isComputed(knockoutElement) && !ko.isWriteableObservable(knockoutElement)) return;
oh good to see they have added that helper method in, I couldn't find it on a precursory look.
If you can, add the change in a pull request and just add a couple of tests for the scenario.
Took me a while to find it, name is confusing as its a computed but obviously inherits from observable. I'll do a pull this evening when I'm back from work.
its ok, I will have 10 mins in a bit, will add the change and some tests in there, can do a new npm release then too.
Done, its in version 1.5.3
awesome cheers :)
Hi,
Come across a problem with knockout.merge. If an observable has an extender it won't write any value to it. I've included a jsFiddle below to show the behaviour, I would have a go at fixing it myself but I have no clue where to start regarding firing them, I thought they were automatic...
http://jsfiddle.net/zrr79ag1/4/