Use $and in the selector ReactiveTable.publish
Opened this issue · 4 comments
dokithonon commented
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
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
same issue with $or operator
peeyushjss commented
You can use like this -
return { "userId": 'w7pxMccWs5MxHyKGf'},{"show" : true}
peeyushjss commented
$or working fine @petsinho