Skip to content

Commit 0467df7

Browse files
committed
collection.Filter: improve the filterBy() signature #2802
1 parent 52b04ee commit 0467df7

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/collection/Filter.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Filter extends Base {
4040
*/
4141
disabled_: false,
4242
/**
43-
* Provide a custom filtering function, has a higher priority than property, operator & value
43+
* Provide a custom filtering function which has a higher priority than property, operator & value
4444
* @member {Function|null} filterBy_=null
4545
*/
4646
filterBy_: null,
@@ -173,7 +173,12 @@ class Filter extends Base {
173173
}
174174

175175
if (me._filterBy) {
176-
return me.filterBy.call(me.scope || me, item, filteredItems, allItems);
176+
return me.filterBy.call(me.scope || me, {
177+
allItems,
178+
filteredItems,
179+
item,
180+
value: me._value
181+
});
177182
}
178183

179184
if (me.includeEmptyValues && (me._value === null || Neo.isEmpty(me._value))) {

0 commit comments

Comments
 (0)