From 8c622b63313bc4c9b11f7544173896ba8ed9e85d Mon Sep 17 00:00:00 2001 From: andonovn Date: Sun, 16 Sep 2018 03:45:32 +0300 Subject: [PATCH] Changed the filterFunction prop to filterBy (#645) The `filterFunction` prop does not exist in the source code. There is one called `filterBy` and I think it was just renamed at some point and you forgot to reflect it into the docs. That's just a blind guess tho, but I lost some time figuring out why the documented prop is not working, and that's why I decided to fix it. Hopefully others won't lost time on that, too :) --- docs/gitbook/Api/Props.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/gitbook/Api/Props.md b/docs/gitbook/Api/Props.md index 740d04d..9285251 100644 --- a/docs/gitbook/Api/Props.md +++ b/docs/gitbook/Api/Props.md @@ -137,14 +137,16 @@ getOptionLabel: { }, /** - * Callback to filter the search result the label text. - * @type {Function} - * @param {Object || String} option - * @param {String} label - * @param {String} search - * @return {Boolean} - */ -filterFunction: { +* Callback to determine if the provided option should +* match the current search text. Used to determine +* if the option should be displayed. +* @type {Function} +* @param {Object || String} option +* @param {String} label +* @param {String} search +* @return {Boolean} +*/ +filterBy: { type: Function, default(option, label, search) { return (label || '').toLowerCase().indexOf(search.toLowerCase()) > -1