aslagle / reactive-table

A reactive table designed for Meteor
https://atmospherejs.com/aslagle/reactive-table
Other
328 stars 137 forks source link

Use $and in the selector ReactiveTable.publish #444

Open dokithonon opened 8 years ago

dokithonon commented 8 years ago

Hello, I am trying to use the $and mongo selector like this : ReactiveTable.publish("myLowStock", Stocks, function(){ return { $and: [ { "userId": 'w7pxMccWs5MxHyKGf' },{"show" : true} ] } } The table show only what match the two conditions (as expected) but the filter does not work anymore.

Any Idea ? Thanks a lot. Thomas

aslagle commented 8 years ago

I think this is a bug in the package - it doesn't combine the selector and the filter correctly when the selector has an $and. Thanks for pointing this out :)

petsinho commented 8 years ago

same issue with $or operator

peeyushjss commented 7 years ago

You can use like this -

return { "userId": 'w7pxMccWs5MxHyKGf'},{"show" : true}

peeyushjss commented 7 years ago

$or working fine @petsinho