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.

Prop type any throws Vue warn

See original GitHub issue

I’m receiving the following error:

[Vue warn]: Invalid prop: type check failed for prop "value". Expected Object, got Number.

@Component({
    name: 'ax-select'
})
export default class AXSelect extends Vue {

    @Prop() classes: string;
    @Prop() items: Array<any>;
    @Prop() label: string;
    @Prop() value: any;
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kaorun343commented, Jun 27, 2018

Please use the new version v7.0.0.

0reactions
DrSensorcommented, Jun 18, 2018

@grzegorztomasiak in the end, I declare it like this

  @Prop({ default: '', type: [String, Array] })
  hideRoute: string | string[]

Although its bit awkward to use type: [String, Array] while there is typescript annotation string | string[]

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue.js throws multiple warnings: Invalid prop: type check ...
Vue.js throws multiple warnings: Invalid prop: type check failed for prop "items". Expected Array, got String with value "".
Read more >
Props types checking is incorrect - Get Help - Vue Forum
I set type for prop to as RouteLocationRaw | string , but the warning says to me that the prop expected Null |...
Read more >
How to test custom prop validators in Vue.js - Vue School Blog
In this article, I will show you how you can test props and custom prop validators in a simple and performant way, without...
Read more >
[vue warn]: invalid prop: type check failed for prop - You.com
BlockI don't want to see this, for any search ... :time is Number type, when you send other than a number, Vue throws...
Read more >
mdb-vue throw invalid prop when using :to=&#38;quot;{ name
Expected behavior. use named routes in :to bind without errors. Actual behavior. Vue raises warning stating invalid prop type: [Vue warn]: Invalid prop: ......
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