mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +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:
@@ -137,14 +137,16 @@ getOptionLabel: {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback to filter the search result the label text.
|
* Callback to determine if the provided option should
|
||||||
* @type {Function}
|
* match the current search text. Used to determine
|
||||||
* @param {Object || String} option
|
* if the option should be displayed.
|
||||||
* @param {String} label
|
* @type {Function}
|
||||||
* @param {String} search
|
* @param {Object || String} option
|
||||||
* @return {Boolean}
|
* @param {String} label
|
||||||
*/
|
* @param {String} search
|
||||||
filterFunction: {
|
* @return {Boolean}
|
||||||
|
*/
|
||||||
|
filterBy: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default(option, label, search) {
|
default(option, label, search) {
|
||||||
return (label || '').toLowerCase().indexOf(search.toLowerCase()) > -1
|
return (label || '').toLowerCase().indexOf(search.toLowerCase()) > -1
|
||||||
|
|||||||
Reference in New Issue
Block a user