aslagle / reactive-table

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

How can I use Regex in filter #447

Open is-undefined opened 8 years ago

is-undefined commented 8 years ago

ReactiveTable.Filter('someColumn').set(someConst);

If I am filtering someConst = ''abc" it gives the following results from table. abc abcdef abchjgkjg and so on. How can I restrict it to just abc?

aslagle commented 8 years ago

You should be able to use the mongo $regex selector. Set the filter to {"$regex": /abc/} instead of the string.

Nizam-smartbox commented 8 years ago

Hi I using Reactive Table on server side.and my issue is { session.set('status','Open'); ReactiveTable.Filter('PkgStatus').set(session.get('status')); } its give me result like Open Open-Now Open-After etc i just want status which is Open not Open-Now and not Open-After

Nizam-smartbox commented 8 years ago

Hi every one i got solution of this problem just use
session.set('status','Open'); ReactiveTable.Filter('PkgStatus').set({$eq:session.get('status')}); instead of the ReactiveTable.Filter('PkgStatus').set(session.get('status'));