Skip to content

v-model assigner is cached #923

@jods4

Description

@jods4

Version

3.0.0-alpha.11

Reproduction link

https://jsfiddle.net/an4cbzd9/4/

Steps to reproduce

This very specific and I know how to work around it but I'm reporting it anyway:
The assigner used by v-model is cached during onBeforeMount and not updated during onUpdate.
If you assign onUpdate:modelValue manually, it won't reflect changes.

Bonus bug: getModelAssigner doesn't expect an array (i.e. more than on listener under the key onUpdate:). It crashes if you register additional listeners.

Easiest fix seems to be not caching assign in onBeforeUpdate and call getModelAssigner in onUpdate. It currently doesn't do much anyway.

What is expected?

When you type in the textbox, an id is logged in console.
This id should change everytime you click on the button.

What is actually happening?

Id stays the same, even after clicking the button.

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