meteor-tabular icon indicating copy to clipboard operation
meteor-tabular copied to clipboard

Collection with ObjectID as _id won't update.

Open pavanputhra opened this issue 10 years ago • 0 comments

Let's say I have declared collection as follows.

Books = new Mongo.Collection("books", {idGeneration :"MONGO"});

and crated tabular table with following selector

TabularTables.BooksTable = new Tabular.Table({
    name: "BooksTable",
    collection: Books,
    columns: [
       ......
    ],
    selector: function( userId ) {
        return { userId: new Mongo.ObjectID(userId),isDeleted: false}
    }
});

What's working and what's not?

  1. Creation a doc will update table UI : Yes
  2. Editing of visible fields will update UI: Yes
  3. marking isDeleted filed to true will remove row: No

Is this bug due to using ObjectID as _id? Yes, because changing collection declaration as below will make row disappear when isDeleted field is set to true.

Books = new Mongo.Collection("books"});

pavanputhra avatar Oct 05 '15 09:10 pavanputhra