aslagle / reactive-table

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

[Q-PR] The best way to implement a reactive filter which does not update automatically #436

Open s7dhansh opened 8 years ago

s7dhansh commented 8 years ago

I am thinking something like, RF.set(<value>, {update: false}). This would help us in case of having multiple filters that update successively within seconds. Then we can call plain .set on the last one, and .set with {update: false} on the others to prevent rerunning of the updateHandle.

What do you think would be a good way to implement such a feature?

aslagle commented 8 years ago

I use _.debounce (https://github.com/aslagle/reactive-table/blob/master/lib/reactive_table.js#L340) to prevent rerunning of updateHandle - it waits to run until 200 ms has passed since it was last called. Maybe just make that value configurable so it can be set to wait a longer time?