Add new custom condition in filter plugin

Tags: #<Tag:0x00007efc6b93e798>

Hi,

I am looking for an option to filter the “Invalid columns” after validating the cells , is there any way to filter the invalid columns using filter_by_condition option or how can we register new condition?

Thanks

Hi @kareerniti12

The filter_by_condition is based on the data. But you can create a custom dropdown menu option.
The logic of the option should be based on the hiddenRows plugin.

Here is the logic of the custom option.

instance.updateSettings({
   hiddenRows: {
      rows: [array_of_indexes]
   }
})

The array_of_indexes is the array you will build from the indexes of valid rows.

The following demo https://jsfiddle.net/yj79e4rh/5/ shows how to use the afterValidate hook to gather indexes of cells. The only valid row is the last one and it is logged 4 times as the only one. It is logged 4 times as 4 is the number of cells in the row.

1 Like

@aleksandra_budnik - It worked… Thankyou for your help

Great! Please feel free to open a new thread when needed.