Rename filter.callback to filter.predicate.

The filter "callback" was only a "callback" in the
most general sense of the word.

It's just a filter predicate that returns a bool.

This is to prepare for another filtering option,
where the caller can filter the whole list
themselves.  I haven't figured out what I will name
the new option yet, but I know I want to make the
two options have specific names.
This commit is contained in:
Steve Howell
2019-12-30 16:44:24 +00:00
committed by Tim Abbott
parent 3f3b9c3b70
commit 110c15737f
11 changed files with 19 additions and 19 deletions

View File

@@ -63,7 +63,7 @@ function populate_invites(invites_data) {
},
filter: {
element: invites_table.closest(".settings-section").find(".search"),
callback: function (item, value) {
predicate: function (item, value) {
const referrer_email_matched = item.ref.toLowerCase().indexOf(value) >= 0;
if (item.is_multiuse) {
return referrer_email_matched;