Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug? : Column-filtered subselection of a syncable dataset : Unable to add rows to the dataset #207

Open
chanakyabhardwajj opened this issue Jul 20, 2013 · 1 comment

Comments

@chanakyabhardwajj
Copy link

I have attached a simple code below, that reproduces the error :

//Create a syncable dataset
var ds = new Miso.Dataset({
  data: [{ one : 1, two : 2, three : 3 }], 
  sync:true
});


ds.fetch({ 
  success: function() {

    //Create a subselection using where
    var oneTwo = this.where({
      columns: ['three'],
      rows: function(row) {
        return row.one == 1;
      }
    });

    //This runs fine
    console.log(oneTwo.length);

    //This one fails to add the row
    ds.add({ one : 1, two : 4, three : 5 });

    console.log(oneTwo.length);
  }
});
@iros
Copy link
Member

iros commented Oct 1, 2013

As noted in pull req comment, can you separate out the fix for this issue from the reversing of the rows-to-remove? I will merge it then. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants