Skip to content

Commit 8c622b6

Browse files
andonovnsagalbot
authored andcommitted
Changed the filterFunction prop to filterBy (sagalbot#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 :)
1 parent a505177 commit 8c622b6

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

docs/gitbook/Api/Props.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,16 @@ getOptionLabel: {
137137
},
138138

139139
/**
140-
* Callback to filter the search result the label text.
141-
* @type {Function}
142-
* @param {Object || String} option
143-
* @param {String} label
144-
* @param {String} search
145-
* @return {Boolean}
146-
*/
147-
filterFunction: {
140+
* Callback to determine if the provided option should
141+
* match the current search text. Used to determine
142+
* if the option should be displayed.
143+
* @type {Function}
144+
* @param {Object || String} option
145+
* @param {String} label
146+
* @param {String} search
147+
* @return {Boolean}
148+
*/
149+
filterBy: {
148150
type: Function,
149151
default(option, label, search) {
150152
return (label || '').toLowerCase().indexOf(search.toLowerCase()) > -1

0 commit comments

Comments
 (0)