Skip to content

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

@chanakyabhardwajj

Description

@chanakyabhardwajj

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);
  }
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions