2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-13 08:32:26 +03:00

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 :)
This commit is contained in:
andonovn
2018-09-16 03:45:32 +03:00
committed by Jeff Sagal
parent a505177900
commit 8c622b6331
+10 -8
View File
@@ -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