Code Monkey home page Code Monkey logo

Comments (7)

grofit avatar grofit commented on September 27, 2024

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.

ballwood avatar ballwood commented on September 27, 2024

Change the giant if that wraps everything at the top to:

if (ko.isComputed(knockoutElement) && !ko.isWriteableObservable(knockoutElement)) return;

from knockout.merge.

grofit avatar grofit commented on September 27, 2024

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.

ballwood avatar ballwood commented on September 27, 2024

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.

grofit avatar grofit commented on September 27, 2024

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.

grofit avatar grofit commented on September 27, 2024

Done, its in version 1.5.3

from knockout.merge.

ballwood avatar ballwood commented on September 27, 2024

awesome cheers :)

from knockout.merge.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.