From a7e4c4d7a9c8fff31565d9b632f91dfd70cf447d Mon Sep 17 00:00:00 2001 From: Mike Smullin Date: Tue, 24 Apr 2018 13:43:21 -0600 Subject: [PATCH] support custom filter behaviors (e.g., search on alphaNumeric only) --- dist/js/bootstrap-multiselect.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dist/js/bootstrap-multiselect.js b/dist/js/bootstrap-multiselect.js index 2a028b77..f29674d6 100644 --- a/dist/js/bootstrap-multiselect.js +++ b/dist/js/bootstrap-multiselect.js @@ -1122,6 +1122,9 @@ else if (this.options.filterBehavior === 'both') { filterCandidate = text + '\n' + value; } + else if ('function' === typeof this.options.filterBehavior) { + filterCandidate = this.options.filterBehavior({ text: text, value: value }); + } if (value !== this.options.selectAllValue && text) {