Right click filter by current value

Tags: #<Tag:0x00007efc6ad110b0>

Hi,

is there any way to filter a column by getting value from selected cell ?

What I would like is:

  1. right click over a cell, and have a context option like “filter by value”
  2. filter those rows with same value than selected cell (without need of typing its value).

Many thanks for all your great job.

Hi @a10m

Yes, that is possible by

  1. Creating a new custom option for the context menu (example of a custom menu http://jsfiddle.net/handsoncode/npbs31d0/)
  2. Saving the column index of the cell from getSelected() method
  3. Saving value of the cell using that getSelected() coordinates for the getDataAtCell() method
  4. Using the index value from point 2 and data from from 3 to run addCondition() method
  5. Running filter() method to rerender the value with your new filter

Thanks for your help.
I will collect from other entries in the forum, and will try to build your solution (barely expert in this area).

You’re welcome. Let me know if you get stuck with anything.