reactive-table icon indicating copy to clipboard operation
reactive-table copied to clipboard

Use $and in the selector ReactiveTable.publish

Open dokithonon opened this issue 9 years ago • 4 comments

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

dokithonon avatar Nov 02 '16 20:11 dokithonon

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 :)

aslagle avatar Nov 04 '16 01:11 aslagle

same issue with $or operator

petsinho avatar Nov 08 '16 15:11 petsinho

You can use like this -

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

peeyushjss avatar Apr 10 '17 09:04 peeyushjss

$or working fine @petsinho

peeyushjss avatar Apr 10 '17 09:04 peeyushjss