Skip to content

how to track changes for array/list elements? #224

@twarogowski

Description

@twarogowski

Hi,

I need to create directive that accepts a list (or array) binding - similar to v-repeat. Is there a recommended way of determining what actually has changed in such bound list?

Let's say I want to remove one element in the middle of the list. Is there API for detecting such changes?

Actually, if a list has changed, only three options are valid:

  • some elements (one or more) have been removed)
  • some elements have been inserted
  • some elements have changed their positions (index)

...or a combination of above. It would be great if there was some kind of built-in mechanism for detecting such changes for array-like parameters :)

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