Add parameters to tooltip filter option (#7556)

This commit is contained in:
Ben McCann
2020-06-29 04:51:20 -07:00
committed by Evert Timberg
parent aa523da832
commit 49f18c262c
4 changed files with 4 additions and 3 deletions

View File

@@ -602,7 +602,7 @@ export class Tooltip extends Element {
// If the user provided a filter function, use it to modify the tooltip items
if (options.filter) {
tooltipItems = tooltipItems.filter((a) => options.filter(a, data));
tooltipItems = tooltipItems.filter((element, index, array) => options.filter(element, index, array, data));
}
// If the user provided a sorting function, use it to modify the tooltip items