Persisting filters

I am planning to persist filters and reuse. So the use case is

  1. User applies filters
  2. We capture filters data for the user
  3. Next when user access the same sheet we should be able to reset the filters to the last values

To do this I have captures conditionCollection on filter. This conditionCollection is being used when user tries to access the sheet again. But I am not able to do so getting

`core.es5.js:1020 ERROR Error: Uncaught (in promise): TypeError: this.conditionCollection.isEmpty is not a function
TypeError: this.conditionCollection.isEmpty is not a function`

What would be right way to address this usecase.

Could you please share a demo where this can be replicable?

Please check out this demo
http://jsfiddle.net/kunalkk15/74tLb5fx/1/

Purpose of the demo:
Showcase reusing filters. On “copy filter” click filters applied in “source table” should be applied to “destination table”.

How does it fits in real use case.?
We will be persisting filters applied on the table. When user access the same sheet in a different session, saved filters we be retrieved and applied back to the sheet. That way user can continue from the point where they left the sheet.

Thank you. I will test it and be back with news as soon as possible.

ps. I think that we can work on a basic demo like http://jsfiddle.net/nueypcba/

Yup, created demo looks fine.

Hi @kunal.wit

sorry, but I lost the context. Have you already managed to do what you wanted?

Nope, Its still open. Few pointers to recall issue.
I am trying to persist filters applied. This is useful for maintaining status of the sheet when user resumes work.
In actual environment filters would be persisted in DB. To simulate I have created an example http://jsfiddle.net/kunalkk15/74tLb5fx/1
As you could see example has two tables. Our aim is to copy filters applied in one table and apply it to another.

Hi @kunal.wit

it’s not a working demo http://jsfiddle.net/4ght7yb6/ but I have placed all needed information on how to add the filters.

You just need to check the comments for the button. Just to remember that all the methods are a part of the Filters plugin so you refer to them via plugin, example

var plugin = instance.getPlugin('Filters');
plugin.filter()