Skip to content

Array data not reactive when mutating it and not using it in template or computed #4096

@ig1na

Description

@ig1na

Version

3.0.0

Reproduction link

SCF Playground

Steps to reproduce

Set an array as data, do not use/display it in template, push some data into it, the array is not updated.

What is expected?

The array should be updated when pushing elements into it.

What is actually happening?

The array is not updated, except if it is displayed or used in the template


If you uncomment the part in the template on the SFC playground, the array will be updated as intended.

I wanted to check/uncheck checkboxes using a method instead of the checkboxes itself, and the checkboxes would not check/uncheck when calling the method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.🐞 bugSomething isn't workinghas workaroundA workaround has been found to avoid the problemscope: v-model

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions