Skip to content

v-model doesn't allow two-way sync #44

@patrickryan79

Description

@patrickryan79

Vue.js 2.6.11

The following only works one-way (if code has a value, it's populated in the editor, but input is never emitted

<CodeEditor v-model="code"  />

Looking at the source code, I was able to make it work by doing this:

<CodeEditor :modelValue.sync="code"  />

Why is this? Is this a recent change? I obviously have concerns about stability. Or am I doing something entirely wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions