'by_value' filter not matches as expected

Hello,

I’m trying to create a ‘by_value’ filter for ‘Apple’ with the Filters plugin API, but the table is empty, however I know that there is at least one matching row.
As I discovered the plugin’s addFormula method transforms the strings given in the 3rd parameter to lowercase, but the formula function is case sensitive so there will be no match ever.

It would be great, if the case sensitivity could be set by the formula, and the lowercase transforming could be disabled.

Thanks
David

Hi @david_horvath could you bring more details of what you would like to achieve?

Please take a look at this example http://jsfiddle.net/vtug9q1y/
In this example you can choose a ‘begins with’ filter and type ‘num’ to get all 3 examples of mixed lowercase and uppercase phrases. It is not case sensitive.

I assume you would like to achieve other type of filter?

@david_horvath has right. Currently filter by_value forcefully convert strings into lowercase like in this demo http://jsfiddle.net/mnn5zm7t/1/. This functionality is on our todo list.

Just updated your example: only using one key “Lorem” and after clicking the filter button, the result is empty table: http://jsfiddle.net/mnn5zm7t/3/

And as I can see now, ‘by_value’ needs an array of arrays as 3rd param, not just a single array.

So
hot.getPlugin('filters').addFormula(0, 'by_value', [['Lorem']]); is correct, but
hot.getPlugin('filters').addFormula(0, 'by_value', ['Lorem']); is not

Thanks,
David

Yes, I forgot to mention that by_value formula uses Array.indexOf to compare values (you can add multiple values to filter). Third param must be passed as an array of arrays.

Thank you,
David