meteor-tabular
meteor-tabular copied to clipboard
Collection with ObjectID as _id won't update.
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?
- Creation a doc will update table UI :
Yes - Editing of visible fields will update UI:
Yes - marking
isDeletedfiled totruewill 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"});