To use a filter in one of your sortable-table templates, it must be registered into the PolymerExpressions scope, which is accessible after polymer has loaded:
If a filter is being used in a rowTemplate
or rowEditorTemplate
and references more than one field, it might be useful to pass the row
as an argument:
{{ record.row | myFilter }}
however, this won't automatically observe the individual fields of the row
. To tell polymer to watch individual fields, they must all be sent as optional parameters:
{{ record.row | myFilter(record.row.myField1, record.row.myField2) }}
The added benefit is that the function can be reused in rowTemplate
s and as a column.formula
: