Skip to content

complex nested objects are not reactive #4292

@xpepermint

Description

@xpepermint

This is my first post here, if I'm not mistaken, so let me say thank you for an amazing framework which inspires us all!

I maintain a package called contextable.js. It uses schema-based objects to describe application's data model and its primary focus is to simplify server-side and client-side data validation. I've been using it in Express.js and GraphQL resolvers for now, but recently I also started using it in Vue.js through vue-contextable plugin.

I'm not sure if this is a bug report or a feature request but I kindly ask for directions on how to handle v-model reactivity in a complex object where arrays of class instances are used. I suspect that Vue.js can't track changes on arrays of class instance objects though I'm not sure what would be the difference in this case compare to an Object. I've created an example here so you can try it yourself.

Vue.js version: 2.1.0
Reproduction Link: https://github.com/xpepermint/vue-contextable-example
Steps to reproduce: Run the example and play with the provided form.
What is Expected?: The user model should be updated when input changes.
What is actually happening?: The model is not updated.

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