Code Monkey home page Code Monkey logo

Comments (4)

kdinev avatar kdinev commented on June 13, 2024

@humblepie Can you provide us with an example of when such an issue is reproducible?

from igniteui-angularjs.

humblepie avatar humblepie commented on June 13, 2024

@kdinev The example I am providing actually demonstrates multiple issues with 2 way data binding.

  • Add and Remove first item button will demonstrate the issue originally described.
  • Add button demonstrates issue with unbound column using formula not being rendered when using grid.renderNewRow to add the new row. Status column is not being rendered.

igniteui-angular-iggrid.zip

from igniteui-angularjs.

kdinev avatar kdinev commented on June 13, 2024

@humblepie thanks a lot for the sample.

@mpavlinov who can take this and investigate?

from igniteui-angularjs.

dkamburov avatar dkamburov commented on June 13, 2024

The first issue is reproducing due to the fact of how both ng-click and ig-grid were designed.

  1. ng-click wraps its function in $apply
  2. change detection mechanism of ig-grid

Change detection mechanism relies on the length of the data to figure out, whether the change is adding, deleting or updating a record. And if both of the changes - removing and adding a record are done, the grid actually considers this as an update(since the length of the new and the old data is equal).

At some point we may improve this changes recognition. But for know you have to use custom click directive, which won't trigger the digest cycle. This way you could trigger the digest cycle for each change and make the grid treat them correctly.

For the second one with the unbound values. Unbound values are not updated when changing the data source. You have to handle them manually with setUnboundValuesByPK API

I modified the attached sample to demonstrate, what I mean for both issues.

igniteui-angular-iggrid-modified.zip

from igniteui-angularjs.

Related Issues (20)

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.