We use the coulmn.filter function in the following way.
column.filterable = function(data) {
var value = data.value,
property = data.property,
record = data.record,
colData = record[property]};
In the version 4.0.4, we are not able to access 'property' which we could access in previous version. Is there any alternative to access the 'property'
I can only think of a very dirty hack so if you decide to use it, do not forget to remove it after the above ticket will be fixed. It could go as follows:
columns : [
{
text : 'Name (custom filter: whole words)',
field : 'name',
flex : 1,
// This column has a custom filtering function that matches whole words
filterable : function(context) {
const { record, value } = context;
console.log(this.property);
return Boolean(record.name.match(new RegExp(`${StringHelper.escapeRegExp(value)}\\b`, 'i')));
}.bind({ property : 'name' })
},