Skip to content

Customizing v-model prop not working #5834

Closed
@KKSzymanowski

Description

@KKSzymanowski

Version

2.3.3

Reproduction link

https://jsfiddle.net/azvoLf8r/1/

Steps to reproduce

  1. Create a component with customized v-model configuration:
model: {
    prop: 'foo',
    event: 'bar',
}
  1. Use the component with v-model:
<custom-component v-model="parentFoo"></custom-component>
  1. Use the prop in the component:
{{ foo }}

What is expected?

The child component should display the value of foo

What is actually happening?

Error is thrown:

[Vue warn]: Property or method "foo" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.

found in

---> <CustomComponent>
       <Root>

I suppose I'm doing something wrong, but I've read the docs over and over and cannot figure out why this isn't working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions