Comments (7)
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.
from knockout.merge.
Change the giant if that wraps everything at the top to:
if (ko.isComputed(knockoutElement) && !ko.isWriteableObservable(knockoutElement)) return;
from knockout.merge.
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.
from knockout.merge.
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.
from knockout.merge.
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.
from knockout.merge.
Done, its in version 1.5.3
from knockout.merge.
awesome cheers :)
from knockout.merge.
Related Issues (13)
- More of question than issue: callbacks HOT 6
- Add a License HOT 2
- Ability to create missing observables on a merge HOT 19
- Properties with Null Value HOT 2
- Merge of Arrays HOT 3
- Initialize constructor with data HOT 5
- Add the ability to infer types for sub objects HOT 1
- Can't get working with RequireJS HOT 18
- Uncaught Error: Pass a function that returns the value of the ko.computed HOT 1
- Publish on NPM HOT 1
- Complex Merge doesn't seem to work correctly HOT 4
- Array merging is failing for simple types HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knockout.merge.