Skip to content

Model decorator isn't able to deal with multiple word variable names #157

@jetze-meilink

Description

@jetze-meilink

We ran into the issue that the @model decorator does not support dashes for the variable name.

With this setup:

Child component
@Model({ name: 'list-view', }) public listViewValue: boolean;

Parent component
v-model:list-view="listView"

It throws: Property "list-view" was accessed during render but is not defined on instance.

When i try to use 'listview' as a single word it works and doesn't show any errors in the console.

I couldn't find any other issues on this nor see it explained in the docs so my question is, is this a on purpose or a known issue?
Or am I somehow misusing this decorator?

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