Invalid prop: type check failed for prop "onSearch". Expected Function, got Boolean.
See original GitHub issueI don’t know, if this is a problem with vue2.0.0-beta.2 or a general problem. When i use the component like this:
<template>
<div class="e-select">
<v-select
:options="options"
:value.sync="selected"
></v-select>
</div>
</template>
<script>
import vSelect from 'vue-select'
export default {
data: function () {
return {
selected: null,
options: ['foo', 'bar', 'baz']
}
},
computed: {},
ready: function () {},
attached: function () {},
methods: {},
components: {
vSelect
}
}
</script>
with vue/webpack, i get the following console-error:
[Vue warn]: Invalid prop: type check failed for prop "onSearch". Expected Function, got Boolean. (found in component <v-select>)
Uncaught TypeError: this.$options.filters.filterBy is not a function [vue-select.js?7800:1]
I checked your dist/vue-select.js
and couldn’t find onSearch
as a function.
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (2 by maintainers)
Top Results From Across the Web
type check failed for prop "value". Expected Boolean, got ...
i used v-model="user.status" but didn't work.What is wrong in here ? vue.js.
Read more >type check failed for prop disabled. expected boolean, got ...
The problem is that you're setting the disabled prop to a function, instead of to the results of that function. :disabled="getFileExtention" (adding quotes) ......
Read more >type check failed for prop "data". Expected Object, got Array
I'm using laravel-vue-pagination getting this error Invalid prop: type check failed for prop "data". Expected Object, got Array. code is. Copy Code
Read more >Vue component should receive prop values of correct prop types
[Vue warn]: Invalid prop: type check failed for prop "age". Expected Number with value 20, got String with value "20".
Read more >type check failed for prop "value". Expected Boolean, got ...
Coding example for the question Invalid prop: type check failed for prop "value". Expected Boolean, got String with value "0"-Vue.js.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess it’s the vue2 - I’m having the exact same problem.
The filterBy is caused by not having any default filters see 2.0 Changes.
The onSearch is probably this: ajax.js:24-26
@sagalbot is there any plan about vue2 compatibility?
@CinKon can’t blame you, he beat me to the punch fair and square. I’ll let you know when it’s done regardless.
@jlippold how about you do a PR then instead of just bashing?
@CraigHarley I’m finally back to a point where I have the time/resources to work on this (as background, I got a serious concussion about 8 months ago and couldn’t write code at all until about 2 months ago - back to 100% now). Put in a few hours yesterday and hope to punch most of it out over the holidays. I’ll keep you posted.