question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid prop: type check failed for prop "onSearch". Expected Function, got Boolean.

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
toabicommented, Aug 10, 2016

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?

1reaction
sagalbotcommented, Dec 19, 2016

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found