I 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.
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?
Sorry @CinKon for leaving you hanging so long. I've been recovering from a concussion for a while now and while my brain is mostly back to 100%, I've been crazy busy at work.
@toabi yeah, this is a vue 2.0 issue. I have been working on a release compatible with 2.0, but I likely won't have it ready until Vue 2.0 is out of beta. The filterBy issue above is probably a pretty quick fix as it's just simple string filtering. If you want to do a PR, I'd be happy to pull that in.
No Problem :)
was it solved? i still get the same error
this.$options.filters.filterBy is not a function(…)
i get the same error =/
this.$options.filters.filterBy is not a function(…)
Just got the same error here too...
TypeError: this.$options.filters.filterBy is not a function(…)
Any news on this?
some error, waiting for update...
The readme should be updated to say this is only vue 1.0 compatible so people don't waste their time
Is there any news on this?
@CinKon, @sagalbot did you manage to get this working with vue2 in the end?
sorry, I used vue-multiselect instead...
@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.
@sagalbot hi thanks for the reply, i'm glad to hear you're back to 100%!
That would be great, I'm not in any great rush to implement this, as I'm using vue-multi now. I'll be sure to check this out when it's vue 2 compatible.
Thanks for all your hard work! :)
Most helpful comment
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?