Select all checkboxes on filtered data

Tags: #<Tag:0x00007efc647d9148>

Hi,
I’d like to add select all checkboxes on the column button to my app.
What is the most efficient way?
Here’s the sample code:
https://jsfiddle.net/r9ewycg4/1/

So basically I’d like to filter cars from 2012 and click one button to exclude all of them.

Hi @adrian.wawrzyn

Can you share precise details on

  • where the button should be placed
  • should the button trigger filtering (if so, what values should stay)

Hi @aleksandra_budnik,
it can be place below hot table. Button shouldn’t trigger filtering, only use already filtered data.

Here’s an example with an external checkbox that adds the ‘contains’ filter to the first columns https://jsfiddle.net/kox9hLzu/1/

Thanks!
But that’s not exactly what I wanted.
I want user to be able to filter data manually, and on button click to change Exclude column value to true on filtered range :slight_smile:

OK. All the operations should be done by the https://handsontable.com/docs/7.4.2/Filters.html#addCondition method using one of those operations

Possible operations on collection of conditions:

  • conjunction - Conjunction on conditions collection (by default), i.e. for such operation: c1 AND c2 AND c3 AND c4 … AND cn === TRUE, where c1 … cn are conditions.
  • disjunction - Disjunction on conditions collection, i.e. for such operation: c1 OR c2 OR c3 OR c4 ... OR cn === TRUE, where c1, c2, c3, c4 … cn are conditions.
  • disjunctionWithExtraCondition - Disjunction on first n - 1 * conditions from collection with an extra requirement computed from the last condition, i.e. for such operation: c1 OR c2 OR c3 OR c4 ... OR cn-1 AND cn === TRUE, where c1, c2, c3, c4 … cn are conditions.

The last one sounds exactly as your case, so I highly encourage you to give it a try and if you’d have any issue with that implementation please share the latest version of the demo and I’ll do my best to share some valuable tips.