aslagle / reactive-table

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

Unable to filter, when encrypted data in data base #465

Open Akhileshkumarr opened 7 years ago

Akhileshkumarr commented 7 years ago

In my data base having encrypted data but before publish i decrypt that data and it displays in reactive-table with decrypted data but if i want to filter that data then filtration is not working on that data. please help and explain me how the filtration is work in reactive-table and what is the solution to overcome this problem. thank you

aslagle commented 7 years ago

Filtering is done either client-side or server-side depending on whether you're using ReactiveTable.publish on the server.

If you're only using reactive-table to display data that's already published to the client, I would expect filtering to work, but I can't tell what the problem might be without a lot more information.

If you're trying to filter on the server, I don't think it's possible - I don't know how ReactiveTable.publish would be able to do the decryption.

Akhileshkumarr commented 7 years ago

Thank you for your reply Actually some fields having encrypted data in db but on the transform of the collection(cursor) we decrypt that data. that means before the publication of data it is already decrypted so that in reactive-table data coming properly in decrypted form that's fine, but filtration is not working on particular fields data. help please

aslagle commented 7 years ago

Are you sure the problem is related to the encryption? There could be something else wrong with your field or filter configuration.

Akhileshkumarr commented 7 years ago

ya i am sure because if i removed encrypted data from db then filtration work properly, that whole issue coming only due to encrypted data in db. then what's the solution please help. thank you

Akhileshkumarr commented 7 years ago

I think it may be solve with client side filtration but i am not getting any documentation regarding that so please share me link of documentation of client side filtration. thank you

aslagle commented 7 years ago

If you aren't using ReactiveTable.publish on the server, it will use client-side filtering. Write your own Meteor.publish and Meteor.subscribe to get your collection onto the client, and use the Collection object as the collection argument to reactiveTable.